wordpress snippets last updated   : April 14, 2014
we now have 630 snippets

Remove thumbnail support from a specific post type

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove thumbnail support from a specific post type. Change POST_TYPE text to either a custom post type name or post, page to remove support for thumbnails.

snippet :  PHPcopy
add_action('init','remove_thumbnail_support');
function remove_thumbnail_support(){
	remove_post_type_support('POST_TYPE','thumbnail');
}

  • http://silodrome.com/ James McBride

    Hi Kevin, I’m a regular WP Snipp reader and I have to ask this, on the top right of your sidebar you have the single best looking RSS/Facebook display I’ve ever seen. Is that a plugin or did you code it yourself?

    • http://wpsnipp.com Kevin Chard

      Hi James,
      Very nice to hear thanks! This was not a plugin I wrote the HTML, CSS and the icons I got from a few free icon sources and I created a few like design poke and design bump. I posted the code and a link to the images on pastebin if you wanted to do something similar.

      http://pastebin.com/5MpkVXKv

  • Emily Chia

    I dun have the  functions.php in my wordpress… Can assist?

    • http://wpsnipp.com Kevin Chard

      Create a text file called functions.php and upload to your theme folder with the code in this pastbin sample http://pastebin.com/rwziqmF7

  • John

    Can you also remove the thumbnail support for a specific page template?

    • http://wpsnipp.com Kevin Chard

      If you don’t want to display a thumbnail within a page template you should just remove the code that adds your thumbnails from the template.

      • http://www.facebook.com/ZeanDesign Adrian Acevedo Galaviz

        John

        function zd_remove(){
        $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;

        // checks for post/page ID
        if ($post_id = array(10,11,12,13))
        {
        remove_post_type_support( $post_type, $supports );
        }
        }

        add_action(‘add_meta_boxes’, ‘zd_remove’);

jqsnipp.com | we just launched jquery snippets website