Featured Image not showing up in Custom Post Type

Ok for some reason I can not get the Featured Image option to show up on my Custom Post Type 'Projects'. I noticed that it says that the template must support featured image so I clicked on Posts to add a regular post and it HAS the featured image option. I also verified in my CustomPress settings that I have Featured Image checked.

There was another support post similar to this and the following code was added to functions.php file

add_theme_support( 'post-thumbnails' );

to fix the problem. I gave that try as well, but no luck :slight_frown:

Thanks in advance,
Melissa :slight_smile:

  • Tyler Postle

    Hey Melissa,

    Hope you're doing well today!

    Do your normal posts show the featured images on them? It should show the featured images in the same place as your normal posts.

    I just tested this on the default 2015 theme and it worked as expected.

    If you're posts aren't showing the featured image then you can follow this post by Tim here: https://premium.wpmudev.org/forums/topic/how-to-add-featured-image-support-to-magazine-theme#post-249186

    That explains how to pull the featured image as well. Adding support is good, but then you want to tell WordPress where in your template you would like it to be displayed :slight_smile:

    Hope this helps Melissa! Let us know if you still need any further assistance.

    All the best,
    Tyler

  • Melissa

    Hey Tyler,

    Thanks for the reply. I have verified that my theme supports the featured image. There is an option to add one in the admin area and it appears on the archive and single pages (it's not pretty but it is there).

    I looked at the link you shared and it is similar to the one I had found in the knowledge base with additional information included.

    Since my first problem is that I cannot get the featured image option to appear in the admin area I tried the first suggestion before I submitted my support request. I added the code that he suggests to my function.php file in my child theme folder. But that had no affect on the admin area.

    Since I can't add a featured image to the custom post types when I add them in the admin area I can't tell whether they are showing up on my archive or single pages.

    Hope that helps.

    Melissa :slight_smile:

  • Melissa

    Hi Ari,

    I have been fighting with this all day. I have gotten it further along but am still having issues I am not sure how to resolve.

    This is the code I ended up having to add to my functions.pho file in my child theme folder:

    <?php

    /* Insert your custom functions here */

    add_action('init', 'my_custom_init');
    function my_custom_init() {

    add_theme_support( 'post-thumbnails' );

    add_post_type_support( 'projects', 'thumbnail' );

    post_type_supports( 'projects', 'thumbnail' );

    }
    ?>

    Please keep in mind I am not a programmer by any means. I just know that this finally displayed the option to add a featured image to my Projects custom post type I created with Custom Press.

    However, the 1st problem I am having now is that when I click to add the featured image and upload the image then click add featured image the screen goes away but there is no image in the featured image. I then click update to save the file and I get a blank screen. But when I use my browser back button the image is then showing up in the featured image section.

    The 2nd problem I am having is that I am trying to add the featured image to my taxonomies-solutions.php (I will also need it on my taxonomies-industries.php page. I created both of those pages using the archive.php file as my template. I have already verified that the thumbnail is in fact displaying on the archive-projects.php page (http://dev.rkmechanical.com/what-we-do/page/12/ scroll to the bottom)

    However that same code is not pulling in the thumbnail on the taxonomies-solutions.php page (http://dev.rkmechanical.com/solutions/contracting/ - the first two properties should have a thumbnail).

    I am completely stumped. :slight_frown:

    Thanks so much for your help.
    Me :slight_smile:

  • Tyler Postle

    Hey there Melissa,

    Hope you're doing well today!

    Thanks for your reply and descriptions here.

    If you remove the code do you stop getting the white page? Just want to make sure that's the cause.

    Can you also grant support access so we can take a closer look? :slight_smile:

    You can grant support access via admin dashboard - WPMU DEV > Support > Support Access > Grant Access.

    Look forward to hearing back!

    All the best,
    Tyler

  • Melissa

    Hey Tyler,

    Thank you guys so much for your help again!! Your team is the best.

    Sorry for the late reply but I submitted a help ticket to the theme designer since I was pretty sure this was going to end up being a theme issue and I hate for you guys to have to spend time fixing theme issues.

    I was sent the solution by them for the correct way to enable the post thumbnail support in my theme.

    Hope you have a great day.

    Me :slight_smile: