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

Learn how to add featured images to a single post or a page in Genesis child themes. You can set it to display featured image, before or after your title on single posts.

Images are very important for enhancing the appearance of your posts. Adding images in the post benefits you in various ways including increasing the unique visitors.

WordPress CMS has a popular feature named Featured images also known as post thumbnails. The featured image (Post Thumbnail) is pulled from the featured image paying little respect to how you include it in your Edit Post screen.

The image showed earlier or after your single post passage title is pulled from the first image you embed into the post unless you evacuate it.

You can evacuate or alter the code which shows an image earlier or after your single post section titles utilizing one of the code snippets on this page. In the event that you add a picture as a featured image, it will be shown as a post thumbnail and not as a featured image after your single post’s title.

If you don’t include a highlighted picture, the first picture in your post will be shown earlier or after your single post entry titles and additionally on your chronicle pages.

In this post, I’ll give you lines of PHP code you can basically paste at the end of your theme’s functions.php file.

Using the code, you can display featured image, before or after your title on single posts.

Displaying featured image after the title in Genesis:

To display featured image after the title, paste the following code:

<?php

//* Do NOT include the opening php tag

function featured_post_image() {
	
	if ( ! is_singular( 'post' ) ) return;
	the_post_thumbnail('post-image');
}

// Display featured image below title on the single post in Genesis 

add_action( 'genesis_entry_content', 'featured_post_image', 8 );

Displaying featured image before the title:

If you want to show the featured image before the title, you have to use this code:

<?php

//* Do NOT include the opening php tag

function featured_post_image() {
	
	if ( ! is_singular( 'post' ) ) return;
	the_post_thumbnail('post-image');
}

// Display featured image before title on the single post in Genesis 

add_action( 'genesis_entry_header', 'featured_post_image', 8 );

Using the code above, you can show the image before your single post title.

Add Featured Image on Static Pages only:

There are various reasons why people desire to have a static page on their website. If you also want to show the featured image on a static single page, use the following code:

Featured Image

Before the title:

<?php

//* Do NOT include the opening php tag

function featured_post_image() {
	if ( ! is_singular( 'page' ) ) return;
	the_post_thumbnail('post-image');
}

// Display featured image before title on the single page in Genesis 

add_action( 'genesis_entry_header', 'featured_post_image', 8 );

Featured Image After title:

<?php

//* Do NOT include the opening php tag

function featured_post_image() {
	if ( ! is_singular( 'page' ) ) return;
	the_post_thumbnail('post-image');
}

// Display featured image after title on the static pages in Genesis themes

add_action( 'genesis_entry_content', 'featured_post_image', 8 );

Add Featured Image on both Static Pages & Single Posts:

If you wanna show the featured image on both then you can use following code:

Featured Image Before Title:

<?php

//* Do NOT include the opening php tag

function featured_post_image() {
	if ( ! is_singular( ) ) return;
	the_post_thumbnail('post-image');
}

// Display featured image before title on both static pages and single posts in Genesis themes

add_action( 'genesis_entry_header', 'featured_post_image', 8 );

Featured Image After Title:

<?php
//* Do NOT include the opening php tag

function featured_post_image() {
	
	if ( ! is_singular( ) ) return;
	the_post_thumbnail('post-image');
}

// Display featured image below title on both static pages and single posts in Genesis themes
add_action( 'genesis_entry_content', 'featured_post_image', 8 );

Hence, you all set by displaying the images by positioning them. All the above codes are tested and outperformed very well. If you have any queries, feel free to ask in the comment section below.

The latest version of the Genesis framework gives you the inbuilt option to display featured images on a single post and page.

See also

Comment Policy: Your words are your own, so be nice and helpful if you can. Please, only use your real name and limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

DEALS

SEOPressor

SEOPressor plugin gives you maximum SEO clarity on your WordPress sites with features designed for controlling WordPress SEO with ease.

GET STARTED

Start WordPress Blog: Ultimate Guide For Beginners

Here is our step by step guide for beginners to start a WordPress blog.

Top 6 Best WordPress Theme Frameworks

There are many websites themes which are created by using a framework. Likewise, WordPress Theme frameworks also becoming so popular. The framework allows you...

The Most Essential WordPress Plugins

Here, I have listed some excellent plugins which will surely add more features and new functionality to your WordPress blog.

Tips to Speed Up WordPress Performance

Here, I am sharing some tips to speed up WordPress performance. All you need to modify .htaccess file on your server and add some plugins.

The Ultimate Guide to Harden WordPress Security

Learn how to improve WordPress security. Here are some basic security concepts that will help you to harden WordPress security.

How to Setup CloudFlare Free SSL for WordPress Blog

Google has announced that they will count HTTPS as a ranking factor which means if you using HTTPS you will get a higher position...

POPULAR NOW

Get almost 100% PageSpeed on Newspaper theme

The newspaper theme is the most popular premium theme for a self-hosted WordPress blog. The theme is developed by team tagDiv. You...

How to Delete Multiple Images in WordPress Media Gallery

Hey, guys today one of my friends asked me a question, How can I delete Multiple Images in WordPress? I replied, "It's very simple." Yeah,...

How to create News Sitemap for WordPress site?

Learn how to create special news sitemap for your WordPress blog/ website using Yoast News SEO plugin and Jetpack plugin.

How To Reduce Admin-Ajax Server Load In WordPress

To increase better user experience, we always end up by increasing site speed. After clicking a website link seems like a simple...

How To Set Up Author Tracking in Google Analytics by MonsterInsights

Learn how to set up author tracking in Google Analytics and easy step by step guide to tracking author using MonsterInsights on your WordPress Dashboard.