WP User Frontend
Use Featured Image on Single Post? (3 posts)

  1. EricaMueller
    Posted 3 years ago #

    I'm wanting to allow people to upload a featured image for thumbnail use in the loop (home page, category archives, etc) but also have it insert the image in the post, before the content.

    Right now, I'm having people upload the image again, in the test box. But, some people aren't understanding that they need to do that, so I have single posts without images.

    What do I need to add to my theme to make this work?


  2. RobReg
    Posted 3 years ago #

    Hi, this should help you:

    Here is what I did to fix this:

    open up single.php and find the line:

    <?php the_content(); ?>

    Just above that, or below if you want the image to appear after the content, put this:

     if ( has_post_thumbnail()) : the_post_thumbnail('thumbnail');

    That should do the trick.

  3. EricaMueller
    Posted 3 years ago #


    This was exactly what I needed!

    Because my theme, being a child theme of the Genesis framework, doesn't have a single.php file, I inserted the code below into my genesis_before_post_content Hook via Simple Hooks:

    <?php if ( is_single() ) {?>
     if ( has_post_thumbnail()) : the_post_thumbnail("thumbnail");
    <?php }?>

    Then I went to Appearance/Media and set my Thumbnail sizes to 400 x 400 and unchecked the proportions box so I'll get a nice sized image above my posts.

    I just wanted to share that bit in case anyone else is in the same boat.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP User Frontend
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic