• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Add Featured Images With Fallback To Previous & Next Post Pagination in Genesis

This tutorial provides 2 solutions which produce the same result. Both code snippets enable you to add previous and next post navigation links to all single posts. On top of this, you can also display the featured image. If none added, a fallback image named featured.png is displayed from your child themes images folder.

Note : For best results, crop your featured images to exactly the same size before uploading. The larger, the better. Using CSS to resize images to the same size can reduce image quality.

The solution includes CSS for media queries which display your featured images in full on smaller screens.

Demo Video

Shows the featured image added before the next and previous post links otherwise a placeholder image is displayed.

Code Installation

There’s 2 steps :

Step 1 : From the download folder, copy & paste 1 of the PHP code snippets from the functions.php file to the end of your child themes functions file.

Step 2 : From the download folder, copy and paste the CSS from the style.css file to the end of your child themes style.css file and clear caching.

Register or login to access the download folder :

Register for full access

Featured Image

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems