Quantcast
Channel: Topic Tag: action | WordPress.org
Viewing all 877 articles
Browse latest View live

mattpitts74 on "Woocommerce - Add action help"

$
0
0

I'm trying to get a small line of extra text to show up on one particular product page. Using the add action I'm able to add the line to all products, but it only applies to one, so I have tried the if statement below, but its still just showing up on all the products.

If anyone can help with this that would be amazing. Thanks

add_action('woocommerce_single_product_summary','text_before_bucket');

                function text_before_bucket() {

              if ( is_product_category( 'PYO' ) ) {
                echo 'choose you picking date below';
              } 

            }

Here's the page I working on http://www.bloom-dev.mac1to1.co.uk/product/bucket-mixed-flowers-and-foliage


One234 on "Adding meta box with action button"

$
0
0

Hey guys,
i want to create a small newsletter plugin, which can send the mails out of the edit post page. I will add a metabox, and dont know how to create a button in this metabox which will start my function. I think its easy but i couldnt find the right example.

TIA

SebvandenBerg on "[Theme: MesoColumn] Where are the actions defined?"

$
0
0

Thanks Richie,
that really helped.

I also am now in the process of converting my changes to a child theme.

Previously I had hard coded the dutch language into your PHP files. I have now undone that and created nl.NL language files, which works fine.

On the converting to the child theme: that seems to behave strangely. So, I have a clean mesocolumn installation now, and added the child-theme by copying your mesocolumn-child folder to the folder where all the themes are, so besides the mesocolumn folder.

If I then switch to the child theme in wordpress, there are a few problems:
1) for the normal site (wider screen) to primary menu is all messed up. One menu item is missing, the order of items has changed and the category colors that I had defined are no longer there.
2) the mobile site (so screen width <770px) has also a problem with the menu: the 'select page' and 'select menu' options on top have disappeared. There is still a orange bar, but it is not as high as it should be.

Other than that the child theme works.

Any thoughts?

(If you want the put the previous topic down as 'resolved', then that is fine with me. I can then raise the child theme issue in a now topic.)

Thanks again.

Richie KS on "[Theme: MesoColumn] Where are the actions defined?"

$
0
0

could you check your child theme style.css, some bug with the template name from latest version 1.6.1

Template: mesocolumn-plus
should be
Template: mesocolumn

or
you might need to resave the custom menu location for the menu to show in mobile.

SebvandenBerg on "[Theme: MesoColumn] Where are the actions defined?"

$
0
0

Hi Richie,
I had done all that already. Unfortunately that does not solve the issue.

Naturally, I had changed the Template, by deleting the '-plus'.

I feel I have tried all I can. I resaved all mesocolumn settings, just in case the child theme needs that reset. But the issue remains.

I really don't feel like setting up the whole site from scratch, just so I can use the child theme. The main theme, with some of my own mods works perfectly. But I will get into trouble once there is a theme update of course.

Richie KS on "[Theme: MesoColumn] Where are the actions defined?"

$
0
0

not sure why but the child theme did inherit parent styles and menu in my end. is it cache issue?

if you saved the theme options, cat or page color using child theme and resave the menu location etc, did any of the save optons work?

must some template in parent theme that you previous edits that were not sync with latest version.

try backups/moved your edited version of mesocolumn(dutch)
download latest version 1.6.1 (no edit)
and try the child theme settings theme option, cat,page color again.

Arfa__ on "Shortcode form to fetch and present data from external source."

$
0
0

I have a shortcode that presents a form allowing the user to search for data in an external source. The shortcode will parse the submitted form parameters, run the query and then return the data.

All fine and good, except being a filter, the query of external source is run twice or even more often. :(

So, Google'ing about, it seems the correct architecture is for shortcode to have no side effects, just dump and form and do nowt else. Then use an init hook to process the form. That make sense, but where should the init hook put the results and how should the shortcode then get hold of the results and return them for display within a post?

Arfa__ on "Shortcode form to fetch and present data from external source."

$
0
0

Whoops, posting in wrong forum, mods could you please move this to the Hacks forum. Thanks!


Mike Rodriguez on "[Plugin: SS Quiz] Need to get the Post ID inside functions.php"

$
0
0

I've been at this issue for HOURS now. I need some help or a push in the right direction at least, because I'm stumped.

Issue: I need to get the post ID inside functions.php

I'm using a plugin called SS Quiz. This plugin is a quiz making plugin, in which you make a quiz on the backend and display it using shortcodes inside your WP WYSIWYG editot. Simple, just like lots of plugins out there.

SS Quiz has a hook in which once the quiz is submitted, it will excute a block of code. Below is the exact code and documentation:

add_action('ssquiz_finished', 'after_quiz_done', 10, 4);

function after_quiz_done( $quiz_id, $user_id, $questions_right, $total_questions )
{
	// do stuff here
}

hook is triggered when SSQuiz is finished by the user

What i'm trying to do is get the post id of the current post/page in which the quiz is on, and execute a block of code simply returns the post id. I've tried everything from using the global $post to setting up postdata(setup_postdata()) inside the function. Nothing has worked. I can return thing like current logged in user, but simply not the post id.

Can anyone test this on their end and see how they can get the post ID? Whether it be on a live server or locally. I just need a push in the right direction at this point.

ANY help would be greatly appreciated!

esmi on "[Plugin: SS Quiz] Need to get the Post ID inside functions.php"

Lindavriesen on "[Plugin: NextGEN Gallery] Not a valid AJAX action. 0 images were uploaded"

$
0
0

I have the same problem.
Do I need to submit a bug report as well?

RickiLong on "[Plugin: NextGEN Gallery] Not a valid AJAX action. 0 images were uploaded"

$
0
0

I have too. The same version.
You have a bug tracker?

Ragnar71 on "Posting formdata to the same form"

$
0
0

Hi,

Sorry if this is a stupid question. I have been looking for the answer of and on for two days now.

On my page I'd like to have a form for entering results/data. Some of the results will be blank while others are filled in. When filling in a result and submitting it no one should be able to submit that result again and the data should show in the form.

Is this easily done or am I out on deep water?

Many thanks!

Ragnar

dodomiz on "[Plugin: WooCommerce - excelling eCommerce] Action failed. Please refresh the page and retry."

$
0
0

hi,
i'm getting this Message "Action failed. Please refresh the page and retry." every time i'm push the button "Make a Reservation".
i tried everything that i found in the forum and nothing worked it up.
i need your help to resolve this issue. please help :)

http://wordpress.org/plugins/woocommerce/

aijuxuan on "[Plugin: NextGEN Gallery] Not a valid AJAX action. 0 images were uploaded"


photocrati on "[Plugin: NextGEN Gallery] Not a valid AJAX action. 0 images were uploaded"

$
0
0

All - Yes, you are welcome to start your own WordPress topic or submit a Bug Report as noted. Although these issues may appear very similar their cause on each of your respective sites could be different and as such each should be reviewed accordingly.

Thanks!

- Cais.

Amit Sukapure on "Add custom hook(filter and action)"

$
0
0

Hello All,

How to add custom hook in WordPress?
Here what I've tried before,

# add action in functions.php

add_action('my_logo', 'my_logo');

function my_logo($logo)
{
	echo $logo;
}

# do action in template file

$logo = '<img src="PATH"/>';
do_action('my_logo', $logo);

Now I want my logo wrapped by adding filter to my_logo,

add_filter('my_logo', 'modified_logo');

function modified_logo($logo)
{
	$logo = '<span>'.$logo.'</span>';
	return $logo;
}

But not getting expected result.
Any help appreciated.

Steven Gliebe on "Add custom hook(filter and action)"

Amit Sukapure on "Add custom hook(filter and action)"

$
0
0

Yes, I found that solution by playing with hooks for couple of hours.
Thanks

disagree on "hookpress_actions apply_filter too early"

$
0
0

in hooks.php we have :
$hookpress_actions = apply_filters( 'hookpress_actions', $hookpress_actions ); and $hookpress_filters = apply_filters( 'hookpress_filters', $hookpress_filters );

both are applied too early though due to them being run on the include, rendering it useless - the $wp_filter array is empty at that time

due to that it seems impossible to add new hooks/filters without touching the plugin's code

http://wordpress.org/plugins/hookpress/

Viewing all 877 articles
Browse latest View live




Latest Images