You might have seen several blogs which displays full width image above the post title in all posts, This Insertion can be done with just few lines of code and user only have to set featured image for a post.


Here is a Genesis Framework Code snippet to display featured image with custom size size in all posts by default. Add the following snippet to your functions.php file.

For Genesis HTML 5 Markup

/* Code to Display Featured Image on top of the post */
add_action( 'genesis_before_entry', 'featured_post_image', 8 );
function featured_post_image() {
  if ( ! is_singular( 'post' ) )  return;
Haven’t Purchased Genesis yet ? Download Genesis Framework 2 from here.

For Genesis XHTML markup (1.x and below)

/* Code to Display Featured Image on top of the post */
add_action( 'genesis_before_post', 'featured_post_image', 8 );
function featured_post_image() {
  if ( ! is_singular( 'post' ) )  return;

In above code post-image  represent featured image size.

/** Support for various Image sizes */
add_image_size('post-image', 600, 300, TRUE );

In above code 600 and 300 is a width and height of featured image respectively. Also don’t forget to regenerate thumbnails if you like to resize previous uploaded images.


  1. says

    Hiya Vivek. Hope you can help me.

    I want an image after post title on index.php and I want not to appear this image in single post after post title. many blogs have this. I think it’s thing of featurd page.

    Thanks and waiting for response : )

  2. Satish says

    How we have a blog home page on genesis child theme with 4 column posts one after the other and like structure

    Post Thumbnail
    Categories belong to
    Post Title
    Post Excerpt
    Date Posted – Comment Count

    Where to edit because I am a newbie with Genesis child themes. I know only pure WP theme (custom page template) which seems not working. Any help would be highly appreciated,

    Thanks! Satish

    • says

      Hi Colin. You can do that by using the ‘genesis_entry_content’ hook instead of the ‘genesis_before_entry’ hook. I set the priority to “1″ to make it appear directly under the Title and Byline.

  3. scot says

    How would I assign the featured image to all posts in Genesis? I’m creating a community artistic site. I would like to lock the featured image to the default website image. This will be pulled from Facebook and other social sites. This will protect the article from being reported if the article as a nude photo in it? I have an age verification system plugin.

  4. Abhijit says

    Hey buddy can you tell me how to centered the image ??

    I mean those featured image which are smaller than 600×300 automatically get aligned to left. So I just want to know if its possible to centered the image ?

  5. says

    Thank you Vivek, I have used your code it works well in my site, but I need to display feature images on “page”s not only “post” pages? I didn’t find any clear HTML5 Genesis solution for this problem.

  6. says

    Hi! Thanks for your tips, they are super useful. I am trying to show the featured image after the post-by-line and before the post content so I hooked the function into genesis_before_post_content but the image doesn’t show… Any idea why?

  7. says

    Hi Vivek,

    Very useful post, your are the best!!! I was looking for a solution like this and I didn’t find something similar, except some plugins that doesn’t work for Genesis. Maybe You can help me with my problem.. How can I exclude from pages a shortcode with custom field added in Genesis hooks plugin? Please help!

  8. Niharika says

    Hi, Vivek
    Interesting post. I think it good news to new web developer like me.
    Your suggestion is going to help me in some ways.
    Regards Niharika

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge