0

I have a problem with remove action from parent theme in my child theme.

Parent theme code:

add_action('custom_action_name', 'function_name', 10);
function function_name() {
  //something
}

Child theme code:

add_action('after_setup_theme', 'remove_function');
function remove_function() {
  remove_action('custom_action_name', 'function_name', 10);
}

I tried to change after_setup_theme action hook to init and wp_loaded but still nothing - parent theme function is still being executed.

I've read lot of tutorials and posts on stackoverflow/stackexchange but i can't see any other solutions...

I'm not able to add any other function to custom_action_name action as well...

Help please ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.