• 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

Add featured image to top of blog page

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 › Add featured image to top of blog page

This topic is: not resolved

Tagged: blog page featured image

  • This topic has 6 replies, 4 voices, and was last updated 12 years, 1 month ago by Celeste.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • May 13, 2014 at 10:38 am #104924
    Celeste
    Member

    Hello. I am working with the Sixteen Nine theme and am using featured images to act as section headers on posts and pages. I would also like to use a featured image at the top of my blog page, but it is not showing up there. The blog is not my home page, but a separate page using the blog template.

    Here is a link to the page: http://temp.inwelligenthc.com/blog/. If you click one of the post titles you will see a featured image at the top of the single post. This is what I am trying to add the top of the blog page.

    The function I am currently using is for single_post_featured_image. I assume I need to add something extra to get the image to show up on the blog page.

    Any insight would be appreciated!

    http://temp.inwelligenthc.com/blog/
    May 13, 2014 at 4:34 pm #104979
    nerdworker
    Member

    Hello,

    I'm not clear on whether you want to show all the posts' featured images on the archive page or if you are just trying to show one specific image at the top of the page. If you just want to show featured images on the archive page, there is a setting in the Genesis Theme Settings, under Content Archives to include featured images.

    If you want to show one specific image at the top of the archive page, then you may need to add a hook to the page in the correct area. This visual guide might help establish where to put it: http://genesistutorials.com/visual-hook-guide/

    Sorry that I'm not exactly sure how to answer.

    Regards,

    Stefanie
    nerdworker.com

    May 14, 2014 at 5:46 am #105061
    Celeste
    Member

    Hi Stefanie, thanks for your response. I am trying to do the latter: add one specific image to the top of the blog page. I am currently using the following function to display the featured image at the top of posts and pages, but it is not showing up on the blog page:

    //* Add featured image to posts and pages

    add_action( 'genesis_entry_header', 'single_post_featured_image', 5 );

    function single_post_featured_image() {

    if ( ! is_singular() )
    return;

    $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
    printf( '%s', get_permalink(), the_title_attribute( 'echo=0' ), $img );

    }

    I assume 'single_post_featured_image' does not apply to the blog page (my assumption could be wrong). I have searched forums and internet for the exact function I need but haven't found anything.

    Thanks,
    Celeste

    May 14, 2014 at 7:36 am #105086
    Lauren @ OnceCoupled
    Member

    It's not being inserted because your conditional (is_singular()) is stopping it. If your blog page is a template, why not take that code and insert it into your template? You wouldn't need the conditional logic any more, so it would just look like:

    add_action( 'genesis_entry_header', 'single_post_featured_image', 5 );
    function single_post_featured_image() {
         $img = genesis_get_image( array( 'format’ => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
         printf( '%s', get_permalink(), the_title_attribute( 'echo=0′ ), $img );
    }

    By the way, use the code tags, or insert a github gist, when you're putting code in the forms.

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    May 15, 2014 at 6:22 am #105272
    Celeste
    Member

    Hi Lauren, I apologize for my ineptitude, but can you direct me on how to add your code to the blog template (it is not a template I made, it is the standard Genesis blog template)? I copied page_blog.php into my child theme folder, but I am unclear on how to modify Genesis page templates. It is very different than the standard WordPress page templates I've worked with before. I am only assuming page_blog.php is the right file to edit?

    Thanks again,
    Celeste

    May 15, 2014 at 6:55 am #105278
    Brad Dalton
    Participant

    You can hook it in using the

    is_page_template('page_blog.php'))

    conditional tag.

    The last 2 code snippets should help http://wpsites.net/web-design/add-content-before-posts-blog-page-only/


    Tutorials for StudioPress Themes.

    May 15, 2014 at 9:36 am #105320
    Celeste
    Member

    Thanks so much Brad! The last snippet on your page worked.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 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

© 2026 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