0

I want to remove the menu item for featured images. I do not want any featured images in posts, so I want to prevent my users from adding any.

How do I remove / hide the link to add a featured image from side menu.

WP 4.7.2

Thanks in advance.

enter image description here

1 Answer 1

0

Somewhere in your theme or parent theme, there's this line:

add_theme_support( 'post-thumbnails' );

If it's in your child theme, you can simply remove it. If it's in your parent theme, you can add this to your child theme functions.php file.

// in your Child Theme's functions.php    

// Use the after_setup_theme hook with a priority of 11 to load after the
// parent theme, which will fire on the default priority of 10
add_action( 'after_setup_theme', 'remove_featured_images_from_child_theme', 11 ); 

function remove_featured_images_from_child_theme() {

    // This will remove support for post thumbnails on ALL Post Types
    remove_theme_support( 'post-thumbnails' );

    // Add this line in to re-enable support for just Posts
    add_theme_support( 'post-thumbnails', array( 'post' ) );
}

https://codex.wordpress.org/Function_Reference/remove_theme_support

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.