WordPress.org

Forums

Fictive
[resolved] [closed] Fictive theme - Featured Image not displaying on the post pages (7 posts)

  1. Scott
    Member
    Posted 1 year ago #

    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.

  2. Scott
    Member
    Posted 1 year ago #

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

  3. 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:
    http://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:

    http://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.

  4. Scott
    Member
    Posted 1 year ago #

    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!

  5. 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: http://codex.wordpress.org/Function_Reference/the_post_thumbnail

  6. Scott
    Member
    Posted 1 year ago #

    Worked like a charm. Thanks again for the help!

  7. You're very welcome. :-)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic