Genesis child themes do not have any option by default to display the featured image on single posts.
While this might be really easy to implement for developers by adding a few lines of code, those of us uncomfortable with code will need to search for suggested code snippets to display featured images.
Having started to use the Genesis framework recently, displaying featured images has become one of my must-add code snippets to the Genesis child themes.
If you are also looking for ways to use featured images in your Genesis child themes, follow along with this short tutorial.
Please note that these tips are only for Genesis Framework themes from StudioPress.
Featured Image on Single Posts
Wouldn’t it be really easy if the featured image that we assign for a post appears automatically on top of the post?
Most of the blogs display their featured images on top of their posts and this has been one of the must-have features in WordPress themes.
To have the featured image automatically appear on single posts, add the below code snippet in your functions.php file of the child theme. (please make sure you are comfortable editing the code and do NOT edit your file on live server.)
Steps adding Featured Image
- Go to Appearance > Editor > Theme Functions (functions.php)
- Add the below lines of code in the file.
https://gist.github.com/pradeepdotco/38fa219f25813afe3531
- You should now have featured images automatically appear in all of your single posts.
Featured Image on Homepage and Archive Pages
Besides, if you are looking to display the featured image on your homepage or your content archive pages, most of the child themes should have this option included by default in your theme settings.
So, follow the steps below to enable this feature via theme settings.
- Go to Genesis > Theme Settings
- Under Content Archives section, define the settings that you prefer (see screenshot below).
Add New Featured Image Sizes
As you can see in the above settings, there’s only a limited option for displaying a featured image in the sizes you want. What if you want a totally different sized image for your featured image?
- Go to Appearance > Editor > Theme Functions (functions.php of child theme)
- Add the below lines of code in the file.
https://gist.github.com/pradeepdotco/c446bed680b1562285c2
Display Featured Image for Genesis Plugin
Although no official plugin exists from StudioPress for featured images, there’s a third party plugin that has a lot of options to add, display and configure featured image settings.
You can download the Display Featured Image for Genesis plugin here.
The plugin adds a lot of options including;
- Display default featured image for all of your posts/pages
- Adding your featured Images in your RSS Feeds
- Add custom styling to featured images
- Several additional filters to allow developers customise the output and have more control.
Steps to add Featured Image Using Plugin
- Download and install the Display Featured Image for Genesis plugin.
- Once activated, from your dashboard go to Appearance > Display Featured Image Settings
- You should now have the option to add featured image on per post basis. You can set up sitewide settings for featured images from this settings page.
- I recommend setting up a default featured image for your website and selecting the option to add featured images to your feed.
If you decide to use the plugin, the plugin might/might not look great simply out of the box. If you are not happy with how it looks, make sure you check out the FAQ section of the plugin that has lot of filters to help you customise the way you want.
Displaying Featured Images below Title with Plugin
One feature that I see most people asking for after installing the plugin is to have their featured images displayed below the post title. This filter is easy to add after installing the plugin but you will need to be comfortable editing your functions.php file.
If you are comfortable editing the code (don’t do on a live server, please), go ahead and add this code snippet in the functions.php file of your current Genesis theme.
https://gist.github.com/pradeepdotco/09737b58bf22bf7f9b39
While a plugin can be convenient if you are looking for additional options for featured images, I suggest learning to add the code snippet manually if you just want to add simple features.
I hope the tutorial helped you to add a featured image in your Genesis child themes. Let me know if you have any questions in the comments below.
This was extremely helpful thanks. Is there equivalent code to show the featured image on every page?
Hi there,
Thanks for the Post, but I’m in quite a Fix!
I’ve already got the below snippet in the functions.php file of my Child Theme, but still the Featured Image isn’t being Displayed on Posts.
//* Add new image sizes
add_image_size( ‘home-bottom’, 150, 150, TRUE );
add_image_size( ‘home-middle’, 348, 180, TRUE );
add_image_size( ‘home-top’, 740, 400, TRUE );
Featured Images are getting loaded on the Home page but when the Post is opened the featured image ain’t getting displayed…
Is there a way out to Fix this?
Any help would be appreciated, Thanks.
You might need to add the code required to make it appear on single posts.
Add the code snippet in first section above to your functions.php file of the child theme.
Do You Have Code for Sample ? Because Iam not Uderstain 🙂
Thank you.
Perfect solution, works perfect. How would you show the image caption along with the featured image?
Help, I did exactly what you explained it looked easy and now I am getting a message about a parse error. I did copy and paste the theme functions.php before I made the changes but still get same error message.
That’s happened to me a number of times, it’s a pain, but the easiest solution is to delete the theme folder from your file manager and then upload it again. Start with a fresh copy of your theme. Since you’re using Genesis, absolutely nothing should be lost.
Worked a treat.
many thanks 😉
Thanks alot man, Great Work! 😉
Hey, it worked great.
I am not sure why my genesis stopped showing the featured image suddenly.
But not its fixed. Thanks man
Glad, it was helpful!
Hi! how to make a Featured Image on Single Posts align center
Hi Dimitris, If you are using a plugin, there should be an option under settings.
I make it with the code
Thank you! The plugin helped!
I only want the featured image to display on single blog posts, not pages. How would I modify the code in featured_post_image to handle this?
Thanks in advance!
Thank you!!!
This was very helpful, i am wondering though, exactly where do i place the code? Or does anywhere work?
It is usually a good idea to place the code towards the end of the file with a comment that you can recognize in future edits.
//The first line is comment
Yay! I added the code at the end of the file, and it worked! Thank you so much for your help..!
Glad that it was helpful Amanda! Your blog looks beautiful.
I’e add the first code and now the image appears in my post. But after adding the second code, nothing changes. What’s the problem?
Thank you! Very helpful. Saw no way to give you a “Like” for this post 🙂
Thank you for this code snippet to add the featured image to the single post page in Genesis/StudioPress’ Beautiful Pro theme.
I’ve got it working however the featured image on the single post page is now appearing above the post title instead of below the post title.
Also – the post title is being “smushed” a bit – it seems to be overlaid over the bottom of image on the single post page.
Can you please tell me what I’m doing wrong?
Thank you!
Thank You for this informative guide. I was searching for showing my feature image on the home page but despite of lots of research, I couldn’t find it. But here I find it on this blog.
Thank you again and keep posting. I just display the featured image on my home page and it looks awesome!
Extremely useful, thanx a lot!
I want o thank you for this post. I went to a dozen other sites trying to find the solution to this problem, but you were the only one who solved it for me. Well done sir!
Hi there,
If anyone not getting featured image after adding the above snippet can use this code to display featured images before the “post title”.
/* Code to Display Featured Image on top of the post */
add_action( ‘genesis_entry_header’, ‘featured_post_image’, 5 );
function featured_post_image() {
if (is_single( ‘[post-type]’ )) {
global $post;
echo get_the_post_thumbnail($post->ID); }
}
NOTE: you can change position of image (before or after) post title by simply changing the function priority.
Thank you!! Gave me a super quick solution to what I thought it was going to take me ages to figure out!
Please, I have a Genesis template, and I have done everything possible to remove (unset) the featured image from my post, and it is not working. Is there a guide to that? Please
Hi,
Is this will work with Corporate Pro Theme?