• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to add the featured image to a single post in Genesis 2.0

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to add the featured image to a single post in Genesis 2.0

This topic is: not resolved

Tagged: featured image, genesis 2.0

  • This topic has 4 replies, 2 voices, and was last updated 12 years, 3 months ago by Vladislav Melnik.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • July 10, 2013 at 8:20 am #50100
    Vladislav Melnik
    Member

    Hey guys,

    I'm getting crazy.

    I can't find a solution for my simple problem - how to add featured images to single posts in Genesis 2.0?

    You can see here that on the homepage everything is fine. But on a single post there is no featured image.

    I already searched Google and the "StudioPress Database" but couldn't find anything useful.

    Hope you can help me? 🙂

    Greetings
    Vladislav

    http://test.affendeal.de
    July 10, 2013 at 11:12 pm #50210
    Derek
    Member

    Try adding this to your functions.php file:

    /** Add Featured Image Above Post Content on Posts */
    function image_before_post_content() {
    if( is_single() )
    	echo '<div class="featured-image-single">' . get_the_post_thumbnail($thumbnail->ID) . '</div><!-- end .featured-image-single -->';
    }
    add_action('genesis_before_post_content', 'image_before_post_content');

    You might need to add some additional code to your style.css file depending on how you want the image to be displayed. The function above wraps the image in the .featured-image-single class.

    .featured-image-single {
    	margin: 0 0 2.4rem;
    	/* etc. */
    }

    Derek Rippe – CSS Artist & Genesis Fanboy @ SynaVista and MediaCairn Design Studio
    Figure out your CSS problems with Firebug | Check out my Custom Comment Form Title plugin

    July 11, 2013 at 1:17 am #50215
    Vladislav Melnik
    Member

    Hi Derek,

    thanks for your response!

    In works fine in the test environment (just replaced the old hook genesis_before_post_content with genesis_entry_header).

    But if you take a look at the live environment, you'll see the thumbnail is only 50px x 50px.

    Do you know why?

    July 11, 2013 at 7:49 am #50237
    Derek
    Member

    Will the featured image always be the same size? If so, you could try adding those dimensions to the function that gets the image:

    get_the_post_thumbnail($post_id, array(590,215) );

    More information on the get_the_post_thumbnail(); function can be found here: http://codex.wordpress.org/Function_Reference/the_post_thumbnail

    You might also be able to force it in the CSS:

    .featured-image-single {
    	display: block;
            height: 215px;
            width: 520px;
    }

    Sometimes I've had issues with image sizes if WordPress hasn't (for whatever reason) resized the image to the right size when I originally uploaded it. Regenerating the Thumbnails usually fixes that (it's easy to try).


    Derek Rippe – CSS Artist & Genesis Fanboy @ SynaVista and MediaCairn Design Studio
    Figure out your CSS problems with Firebug | Check out my Custom Comment Form Title plugin

    July 23, 2013 at 10:36 am #52085
    Vladislav Melnik
    Member

    Hey Derek,

    forgot to say thank you... so, THANK YOU!

    Helped, everything is cool now! 🙂

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble