How to remove an action hook on WordPress?

I liked this solution:

For removing an action hook you should use the same action name, callback name and the priority that was used to add a action in parent theme. And register it on init
add_action( ‘init’, ‘remove_my_action’);
function remove_my_action() {
remove_action( ‘woocommerce_before_shop_loop’,’storefront_sorting_wrapper’,9 );

Source »

So, if you need to remove a specific action on WordPress, that’s how you do it.

WordPress Logo
File:WordPress.svg – Wikimedia Commons
Share on WhatsApp

Lasă un comentariu

Rules for commenters »

Puteți folosi Gravatar pentru a adăuga avatar (imagine comentarii).