In my tutorial requests Trello board, a user asked:
Hi Sridhar, how would you approach having an archive page for each taxonomy of a CPT? I started with https://sridharkatakam.com/grid-portfolio-images-title-excerpt-hover-showcase-pro/ , but there wasn't a clear way to setup a separate page for each taxonomy. Thanks!!
Archive pages for taxonomies are usually enabled by default and the CPT entries belonging to a particular taxonomy term will automatically appear on that term's archive page.
Ex.: example.com/portfolio_category/featured/ will show all the
portfolio entries that belong to
Featured portfolio category (a custom taxonomy) at that URL.
In this tutorial, we are going to create a template and load it using
get_template_part in archives (category archives, tag archives, CPT archive pages, custom taxonomy term archives, author pages etc.) and the Posts page in Genesis to display the entries using CSS Grid.
Featured images will appear and when hovered over, title and excerpt will be revealed with the entire block clickable to the individual entry page.
We shall use a fallback image for entries that do not have a featured image.
Title and excerpt will be shown below the image from 1024px and below.
Between 557px and 1023px (inclusive), the grid will have 2 columns.
From 556px and below, entries will appear in a single column.
While the tutorial has been written for Genesis Sample, it should work with a few adjustments in any Genesis theme
Add the following in child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.