How to Display Featured Image in Genesis Before or After Post Title

>How to Display Featured Image in Genesis Before or After Post Title
  • blog post featured image

The Genesis Framework (affiliate link) and many of its child themes (affiliate link) don’t display a featured image in single posts by default.

So, you’ll have to enable that feature yourself, and it this tutorial, I’ll show you how!

I’ll teach you how to display a featured image in your Genesis child theme, before or after the post title, by using code or a plugin.

Display featured image in Genesis child theme using code

If you simply want your featured image to be displayed on single posts, I recommend using this method because it’s not hard and it’s much better than adding yet another WordPress plugin!

The fewer plugins you have, the better!

In order to do this, you’ll have to learn how to access and edit your WordPress site’s files.

I recommend backing up the file or the entire WordPress website before making any changes!

1. Display featured image in Genesis child theme before post title

Step 1 – Find and edit your Genesis child theme’s (not the Genesis Framework) functions.php file, which is normally found in public_html/wp-content/themes/YOURTHEMENAME/functions.php.

In case you have an add-on domain, then the file should be located in: public_html/YOURDOMAIN.COM/wp-content/themes/YOURTHEMENAME/functions.php

genesis child theme fucntions.php

Editing the file in cPanel

Step 2 – After opening the file for editing, add this PHP code at the very bottom:

/* Display Featured Image before post title */
function display_featured_image() {
if ( ! is_singular( 'post' ) ) return;
the_post_thumbnail('post-image');
}
add_action( 'genesis_entry_header', 'display_featured_image', 8 );

display featured image in genesis before post title

Now your featured image should be displayed right before the post title.

2. Display featured image in Genesis child theme after post title

To display the featured image in your Genesis child theme after the post title, you need to follow the above steps, but add this code instead:

/* Display Featured Image after post title */
function display_featured_image() {
if ( ! is_singular( 'post' ) ) return;
the_post_thumbnail('post-image');
}
add_action( 'genesis_entry_content', 'display_featured_image', 8 );

display featured image in genesis after post title

Display featured image in Genesis child theme using a plugin

The plugin is simply called Display Featured Image for Genesis, and it offers quite a few features that you can access from Appearance -> Display Featured Image for Genesis.

Here are some of them:

  • You can display the featured image as a ‘backstretch’ image, meaning that will stretch on the full width of the screen;
  • Adds the featured images to your WordPress RSS feed as well, which is great if you want to send ‘latest posts’ newsletters automatically with MailChimp;
  • Lets you choose where to show the featured image, before or after the post title.

Here are some screenshots with all of them, so you can check them out.

That’s a wrap

Hope the post was comprehensive and you’ve managed to successfully display the featured image for your posts in your Genesis child theme!

Don’t forget to share the post to help out others!

You can quickly subscribe to my newsletter by using this link or the subscription form.

If you have any questions or thoughts, drop a comment or send a message via contact or Facebook page.

You can also hit the follow button on Twitter and subscribe to the YouTube channel.

If you want to start your own WordPress blog, or need a website for your business, ThemeSkills’ WordPress installation service is at your disposal! On-going WordPress support and maintenance are on the menu as well!

By |2018-09-16T16:48:41+00:00September 11th, 2018|Customization, Themes|0 Comments

Leave A Comment

WP ENGINE OFFER!

20% OFF + 4 months FREE on WordPress hosting
Offer expires on 11/30/2018
To celebrate the release of the Gutenberg editor, WP Engine is offering:
  • 20% OFF the first payment on their shared WordPress hosting plans;
  • 4 months FREE on any annual subscription.

And there's more! Since WP Engine bought StudioPress, all their customers get FREE access to the StudioPress themes, including the Genesis Framework!
 
Disclosure: If you make a purchase using this affiliate link, I might receive a commission from WP Engine, at no additional cost to you! Thank you!
close-link