Scratch-Theme icon indicating copy to clipboard operation
Scratch-Theme copied to clipboard

remove_filter() in child theme

Open pnpetroff opened this issue 11 years ago • 1 comments

What is the best way to remove_filter() (in child theme) that is written in inc/hooks.php?

What I have to write in the child-theme/functions.php? I can't seem to be able to do so...

Thanks!

pnpetroff avatar Nov 17 '15 09:11 pnpetroff

If that filter is executed/applied later than fw_init, then try

function _action_child_remove_hooks() {
    remove_filter(...);
}
add_action('fw_init', '_action_child_remove_hooks');

ghost avatar Nov 17 '15 09:11 ghost