I'm trying to override a parent theme filter in a child theme; I must have the syntax wrong as the override is being completely ignored. Here's what's in my child theme's functions.php:
//* remove and replace parent filter
function child_remove_parent_function() {
remove_filter('filter_name','parent_function');
}
add_filter('filter_name','child_function');
//* my custom function
function child_function($link){
//* function code here
return $link;
}
The child theme is definitely in use - I initially tried copying & customizing the function and got the 'cannot redeclare function' error. Just not sure why I can't replace the filter.
I even tried leaving just
function child_remove_parent_function() {
remove_filter('filter_name','parent_function');
}
to see if the outputted link would break but that didn't do anything either. What am I missing?