A user asked,
I'm trying to add a column grid of the 8 latest portfolio items to my front page (amongst other content) by adding code tin front-page.php. Each item should show the featured image, title and excerpt. I need to keep the standard loop in tact to display the introductory content but just add the portfolio items as additional content.
In this video tutorial I show how we can display 8 entries of a Portfolio CPT next to each other in columns below the header. We are going to use Genesis Sandbox Featured Content Widget plugin for outputting the entries in a custom Home Featured widget area that's hooked to
genesis_after_header in front-page.php.
In CSS each entry is floated left and given a left margin equal to the desired gap between the entries. :nth-of-type pseudo-class is used to remove the left margin for entries in first column for all rows.
We shall also write media queries such that the number of columns changes depending on the viewport width for responsiveness like this:
769px and above: 8 columns
Between 501px and 768px: 4 columns
500px and below: 2 columns
To view the full content, please sign up for the membership.
Already a member? Log in below or here.