It’s been very hard to do the coding part and bringing the results to work perfectly. The best part of the handmade coding website is, will rank better in the search engines. In that case, Genesis framework is one of the best tight security and SEO optimized framework from StudioPress developer club. In this guide, we will tell you How to display the featured image on a single post in Genesis child theme. You may be wondering to find out the coding and how to code it, here we made it with simple easy steps to add!
3 Steps To Display The Featured Image Before Single Post Title in Genesis Child Theme
Please make sure that before you proceed to keep a copy of the function.php file to your local system, if suppose, you have got broken with your code then later you can fix by uploading the original copy.
Step: 1
If you are afraid to use the function.php file directly from the Genesis child theme, then you can use this free functionality WordPress plugin. This plugin will allow you to easily edit the function.php file and add the code to it.
Step: 2
There are two different methods to add the codes to function.php file.
Method 1: Using Functionality Plugin:
If you have installed the functionality plugin then follow this step: Go To -> Plugins and you will find the option called “Editor” click on it.
Method 2: Accessing function.php file directly
You can directly Go to -> Appearance -> Editor from there you will see function.php file named as “Theme Functions” on the right side area.
Here you need to add the following code to display the featured image on your single post of Genesis child theme.
Step: 3
Copy and Paste the following Code to your function.php file.
[php]
//* Display featured image before single post title
add_action( ‘genesis_before_entry’, ‘featured_post_image’, 8 );
function featured_post_image() {
if ( ! is_singular( ‘post’ ) ) return;
the_post_thumbnail(‘post-image’);
}
[/php]
The above code will display the featured single post image before the single post title.
About The Author:
This guest post has been posted by suren from TechMagz.com, who is very enthusiast to blog about technology news, gadgets, WordPress themes, tutorials and plugins.