Hi, I’m trying to override generate_blog_single_featured_image() in functions.php.
But it’s causing a bit of trouble.
I’ve tried adding the following code:
add_action( 'init', 'remove_actions_parent_theme');
function remove_actions_parent_theme() {
remove_action( 'generate_before_content', 'generate_blog_single_featured_image' );
add_action( 'generate_before_content', 'custom_generate_blog_single_featured_image' );
};
but I just end up with 2 featured images, meaning it did not remove the action.