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

WP SITES

2662

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Genesis Related Posts With Images

The code in this tutorial provides the answer to the following question from a members of the Genesis community:

Question : I want to make related posts without using a no plugin which is similar to Jetpacks related posts.

Answer : You can do this using WP_Query and a few other WordPress & Genesis functions which add the related posts entry title and featured image producing the following result:

The code for this solution also includes media queries which enable you to display each entry full width on smaller screens like you see in the following demo video :

Demo Video

Coming Soon!

Installation

  1. Copy and paste the following PHP code below to the end of your child themes functions.php file.
  2. Copy & paste the following CSS to the end of your child themes style.css file.

The code enables you to display entries by related category or tag and also excludes the current entry from display.

Here’s the code for logged in members:

Register for full access

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