Site icon League WP

How to Display Related Posts with CSS Grid in Genesis

How to Display Related Posts with CSS Grid in Genesis

This guide is just an extension of one of my earlier guides, “Display Related Posts in Grid Format in Genesis.”

In the earlier guide, I’d shown you how to display related posts in Grid Format which essentially used Genesis Column Classes.

However, this guide takes the CSS Grid approach to do the same thing.

I’ve modified the php code slightly to suit the CSS Grid and then added some fresh CSS code to apply CSS Grid to it.

Here we go:

Add the Following Code to Your Functions.php file

Add the Following Code to Your Style.css file

Refresh your single post and you should be able to see related posts in CSS Grid format.

Why CSS Grid Instead of Genesis Column Classes?

CSS Grid allows you more control to customize your display while it can be a bit complicated with Genesis Column Classes.

Please, let me know if you have any questions.

Exit mobile version