Too many actions/filters!

Take a look at Mike’s answer to a similar question more specifically the plugin he posted there can be used to create a list of all action hooks and filters that were called to generate that page in order of execution.

Add classname to the_category() function?

First locate the_category() in the Codex. Scroll down to the bottom of the page to “Source Code”. There is a link “the_categfory() is located in …”. Click the link, you will be redirected to the source code. Alternativly open the file wp-includes/category-template.php in your IDE or editor. Now search for function the_category(). You will see … Read more

Customize WooCommerce Error Message

You can do this with the woocommerce_add_error filter. Add the following to your functions.php file. // alter the subscriptions error function my_woocommerce_add_error( $error ) { if( ‘The generic error message’ == $error ) { $error=”The shiny brand new error message”; } return $error; } add_filter( ‘woocommerce_add_error’, ‘my_woocommerce_add_error’ );

How can I add a fifth option to the alignment picker?

You mentioned using the class in your comment. You could try just adding max-width:100% to the css from the link you provided. Or use jQuery: $(document).ready(function(){ $(‘img.fulljust’).each(function(){ if($(this).width() > 300){ $(this).css({ ‘width’ : ‘100vw’; ‘position’: ‘relative’; ‘left’: ‘50%’; ‘right’: ‘50%’; ‘margin-left’: ‘-50vw’; ‘margin-right’: ‘-50vw’; }); } }); }); EDIT: I realized I didn’t answer your … Read more

How can I register a new REST context?

GraphQL is more flexible in general than the built-in REST API, regarding customizing the response. GraphQL is currently not shipped with the WordPress core, but is available as a plugin. Let’s look at the existing endpoints for the WP_Post object(s). We note that it is possible to use the _fields query parameter to include specific … Read more

Add a Span Around a Product Title in WooCommerce [closed]

Here is how you do it, First remove woocommerce single title action, and create your own function to handle the title, later add back the action using your newly created function. <?php remove_action(‘woocommerce_single_product_summary’,’woocommerce_template_single_title’,5); add_action(‘woocommerce_single_product_summary’, ‘woocommerce_my_single_title’,5); if ( ! function_exists( ‘woocommerce_my_single_title’ ) ) { function woocommerce_my_single_title() { ?> <h1 itemprop=”name” class=”product_title entry-title”><span><?php the_title(); ?></span></h1> <?php } … Read more

Add filter to wp_dropdown_pages() or wp_dropdown_categories() – no select container?

A filter called wp_dropdown_pages exists in the wp_dropdown_pages() function. That filter allows you to modify the output of the function. However, for the thing you want to do I would not recommend using this filter since this will apply to all code that calls wp_dropdown_pages(), including plugins. So, one way to approach your situation may … Read more

filter title from shortcode

why not to use the_title filter? add_filter(‘the_title’, ‘the_title_filter’); function the_title_filter($title){ $post = get_post(get_the_id()); //enter code here return $title; } as for shortcode – its imposible. in logical way – imposible.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)