In a recent Genesis customization I took up, the requirement was to display 1 latest Post and 5 Pages in Home Featured section instead of 6 latest Posts while implementing the Featured Posts Grid with Random Background Colors in Genesis tutorial.
The Pages to be featured are those for which a custom field, "Featured on homepage?" tick box would be checked.
The check box is a True / False custom field set via ACF.
On the front end:
Here's the code behind that:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
This will come in handy one day, thanks!
Hi Sridhar,
If you have different CPT, with different sized featured images and want to pull all these in, say using a masonry style, how would you go about this?
Thanks,
John
Can you take a look at https://sridharkatakam.com/displaying-posts-output-display-posts-shortcode-masonry-style/ and see if it’s something you can use/refer to?
[…] a function hooked to
genesis_after_header
, loop through the results set of two combined queries and show image (featured image if present, otherwise a placeholder) and linked title. The first […]