Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6804753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:30:17+00:00 2026-05-26T19:30:17+00:00

I have created a custom post type called banners and want to enable the

  • 0

I have created a custom post type called banners and want to enable the thumbnails in that post type. Hence I have put the following code just after the starting tag on my functions file but the banners post type still are not showing featured image option in the admin panel.

if ( function_exists( 'add_theme_support' ) ) { 
  add_theme_support( 'post-thumbnails', array( 'banner' ) );
}

If I replace the banner with post or page the featured image option does show up in the respective menu options.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:30:18+00:00Added an answer on May 26, 2026 at 7:30 pm

    You need to make sure that your custom post type allows the use of the featured image. Here is an example of a custom post type with thumbnails allowed:

    <?php
    function your_custom_post_types() {
        // Portfolio
        $labels_portfolio = array(
            'add_new' => __('Add New', 'portfolio'),
            'add_new_item' => __('Add Portfolio Item'),
            'edit_item' => __('Edit Portfolio Post'),
            'menu_name' => __('Portfolio'),
            'name' => __('Portfolio', 'post type general name'),
            'new_item' => __('New Portfolio Item'),
            'parent_item_colon' => '',
            'singular_name' => __('Portfolio Post', 'post type singular name'),
            'view_item' => __('View Portfolio Item'),
        );
        $args_portfolio = array(
            'capability_type' => 'post',
            'has_archive' => true, 
            'hierarchical' => false,
            'labels' => $labels_portfolio,
            'menu_position' => 4,
            'public' => true,
            'publicly_queryable' => true,
            'query_var' => true,
            'rewrite' => array( 'slug' => 'portfolio', 'with_front' => true ),
            'show_in_menu' => true, 
            'show_ui' => true, 
            'supports' => array( 'comments', 'editor', 'excerpt', 'thumbnail', 'title' ),
        );
        register_post_type( 'portfolio', $args_portfolio );
    }
    ?>
    

    The line that allows the thumbnail is this one:

    'supports' => array( 'comments', 'editor', 'excerpt', 'thumbnail', 'title' 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

friends, i have created custom title bar using following titlebar.xml file with code <?xml
I have created a custom post type of 'portfolio' and page with a template
I have created custom post types that also have custom meta_boxes I've created. Currently,
I have created a wordpress custom post type. I am using custom field template
I have created a custom post type restaurant. But Its not coming on the
I have a WordPress custom post-type setup. I've created single-[customposttype].php However instead of displaying
I have created a custom workflow activity that copies attachments from a case to
I have created a custom tag that looks like this: def textField = {
I have the following code to build a custom taxonomy for my portfolio: add_action(
Using Marius Gedminas's excellent blog post , I have created a custom traverser for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.