Skip to main content
2 of 2
more info
Rick Hellewell
  • 7.1k
  • 2
  • 21
  • 41

Inside your remove_parent_actions_filters() function, add a test to see if the parent theme's function has been loaded. Maybe you are calling your hook too soon.

add_action( 'init', 'remove_parent_actions_filters' );
function remove_parent_actions_filters() { 
   if (!function_exists('fwp_archive_header')) {wp_die("fwp_archive_header function is not loaded");}
  remove_action( 'tha_content_while_before', 'fwp_archive_header' );
}

Added

Try using the after_setup_theme hook instead. See https://codex.wordpress.org/Plugin_API/Action_Reference/after_setup_theme .

Rick Hellewell
  • 7.1k
  • 2
  • 21
  • 41