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

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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

Related Posts

  • How to code a custom block for a related posts query in genesis
  • How To Add Related Posts Between Paragraph Content
  • Show Related Posts by Primary Category Only

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.