wphats

Remove Filters or hooks from Custom Post Type

Remove Filters or hooks from Custom Post Type

During WordPress works sometimes we face few unwanted issues like some plugin has filters that works for all post types that actually bothers. In my short tutorial i would like to show how you can remove those filters from your custom post type very easily by a single piece of code and i believe you gonna love it.

To remove one specific filter(hook) you must have to know the actual filter name. So here is the code that you need to place in your functions.php file :

That’s cool, right ?

But if you like to remove all filters/hooks from a custom post type then just place this code in your funcitons.php file :

Please remember, remove_all_filters function removes all of the hooks from filter, and remove_filter remove specific hook name. So if you use ‘remove_all_filters’ you may need to add filter for shortcode

That’s all. Still if you any question. Please drop a message below.

Thanks.

This post has already been read 2896 times!

Mehedi Hasan

Cool WordPress Developer having much agile experience to develop any kind of WordPress sites & plugins. Also good in troubleshooting, fixing & making any kind of tweaks for WP site.

More Posts

POSTED ON: Wordpress Support, Wordpress Tricks
TAGGED : , ,

Leave a Reply

Your email address will not be published. Required fields are marked *