Help Needed with Blog Categories and Archives

Hi there,

We’re working on a new Grav site and have setup a blog section with a few physical categories to help group the blog posts as we expect to see a large number of blog articles in each in the future.

We’re using the Typhoon Theme and it’s great so far.

We have it setup in this way (just using examples below):
/blog/category-1/articles
/blog/category-2/articles
etc,
etc.

The /blog page is template “Blog”
The /category-x pages are also as template “Blog”
The final articles in each category are as template “Post”
Each category page and subsequent article pages are tagged with Taxonomy Category of that category.

When we had the original setup with all blog articles under /blog/ only the Archives plugin worked just fine but because the site will have hundreds of posts per category we decided to go for the additional “hard” category in the url and breadcrumbs as explained above.

When one visits the /blog page you get a nice listing of all the categories, each displayed as a post heading block with hero, title and description.

What is need to be able to do is the following:

  1. How to get each of those category blocks to show the number of posts below it?
    I understand it is possible to use Twig or another method to count the child pages and display it, just not sure how to do this correctly and which template to modify.

  2. How to get the Archive plugin or Archive Plus plugin to work correctly per category and show the listing of only those articles below that category.
    As it is, it shows only the list of categories now and I’ve tried various filter settings but just can’t seem to figure out how to filter or group so I get the correct ones to show.

Help would be appreciated.

Thanks,
Ryan

@ryanz, Please direct all Premium product related questions/issues at GitHub - getgrav/grav-premium-issues: Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.

You’ll get free support from the Typhoon developers themselves.

2 Likes