• Resolved Scott

    (@spinolaconsulting)


    I can’t figure out how to display the featured image on my post pages. It displays on my home page with the excerpt, but not on the post page itself.

    Anyone know what I’m doing wrong here?

    The blog I need help with is scottspinola.com.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Scott

    (@scottspinola)

    My alter ego now that I figured out how to access the account. Just bumping into my queue.

    It displays on my home page with the excerpt, but not on the post page itself.

    That’s how Fictive – and many other themes with featured images – is designed. You’re not doing anything wrong.

    You can see it on the theme demo here:
    https://fictivedemo.wordpress.com/

    The post called Best Coffee I’ve Ever Had displays its featured image on the homepage, but not on the individual post page:

    https://fictivedemo.wordpress.com/2011/07/07/best-coffee-ive-ever-had/

    You can always insert it into the body of the post if you’d like it displayed there too. Since you’re switching over to excerpts on the homepage, it shouldn’t be repeated there twice.

    Scott

    (@scottspinola)

    Thanks for the info.

    This is so frustrating. It seems rather useless to me to have an image for the post on the home page but not have that image on the post itself. Having to add the image in two places is poor design in my view.

    Any idea how I can modify the theme to automatically insert the featured image in the post where it belongs? I already need to create a child theme to make another modification that should also already be in the theme so I may as well make them both at the same time.

    Thanks!

    Any idea how I can modify the theme to automatically insert the featured image in the post where it belongs?

    Sure! If you’d like to add a featured image to the single post view, you’d make a copy of content-single.php and place it in the child theme.

    If you haven’t already made any changes in this file in your child theme, you’ll see this code on line 31:

    <div class="entry-content">

    Right after that line, you can add the featured image with some code like this:

    <?php
    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
      the_post_thumbnail('medium', array('class' => 'alignleft'));
    }
    ?>

    You can choose another size instead of medium – it’ll follow the dimensions you’ve set for each size under Settings > Media. The class “alignleft” will align the image to the left of your post. You can change it to “alignright” if you prefer, or add a custom class that you apply CSS to in your child theme’s stylesheet.

    Function reference: https://codex.www.ads-software.com/Function_Reference/the_post_thumbnail

    Scott

    (@scottspinola)

    Worked like a charm. Thanks again for the help!

    You’re very welcome. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fictive theme – Featured Image not displaying on the post pages’ is closed to new replies.