• 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

Featured image at top of posts

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 › General Discussion › Featured image at top of posts

This topic is: not resolved

Tagged: featured image, php, posts

  • This topic has 3 replies, 3 voices, and was last updated 12 years, 7 months ago by DenverEric.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 25, 2013 at 8:41 am #31110
    SelenaD
    Member

    Please help me - I've added the code below to functions.php file to add the featured post to the top of the single post page. It works fine on my development account. In the live site, however, the featured image is still not showing up at the top of the post. I've gone through deactivating plugins, and nothing seems to be causing the problem. I'm completely lost.

    /** Add featured image above single posts */
    add_action( ‘genesis_before_post_title’, ‘rm_featured_image’ );

    function rm_featured_image() {
    if ( is_single() ): ?>
    echo ‘<div id=”featured-image”>’;
    echo get_the_post_thumbnail($thumbnail->ID, ‘thumbnail-size’);
    echo ‘</div>’;
    <?php endif;
    }

    Here is a post on the live site: http://speakupforsuccess.com/6915/public-speaking-tip-13-listen-to-your-audience-part-2/

    If anyone can help me I'd be so very grateful - I'm completely frustrated.

    March 25, 2013 at 8:51 am #31115
    Brad Dalton
    Participant

    Which theme are you using?

    Here's the code from the streamline theme which pulls an image from the posts and displays it above the posts title. If i knew which theme you are using, i could test it locally using the same theme.

    /** Add post image above post title */
    add_action( 'genesis_before_post', 'streamline_post_image' );
    function streamline_post_image() {
    
    	if ( is_page() ) return;
    
    	if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) {
    		printf( '<a href="%s" rel="bookmark"><img class="post-photo" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
    	}
    
    }
    

    Tutorials for StudioPress Themes.

    March 25, 2013 at 8:55 am #31117
    SelenaD
    Member

    It's a custom child theme converting from thesis to genesis. Is the code above pulling the featured image or an image from inside the post? It's the featured image we're looking for here.

    Thanks!

    April 22, 2013 at 11:12 am #36914
    DenverEric
    Member

    I am working on a custom plugin to help migrate from Thesis to Genesis. The post image in Thesis does not move over to a new theme, such as Genesis, it stays with Thesis in your blog's database.


    DenverEric

    The Blog of Eric Rosenberg – Narrow Bridge Finance – The Israel Situation

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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