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 :
- Copy and paste the following PHP code below to the end of your child themes functions.php file.
- 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:
Leave a Reply
You must be logged in to post a comment.