Blog sections and category filtering

  • I have a blog with two sections: 'posts' and 'case-study'.

    The categories for each section are the same.

    I can list out posts from the different sections with:



    'section' => 'case-study',

    'sort' => 'postDateTime',

    'sort-order' => 'DESC',

    'template' => 'blog/post_in_list.html'



    I'd like to also output the list of blog categories set up for the blog on a per section basis. I though that this would work, but I only get the list of categories containing a mixture of all the blogs (not per section).

    <?php perch_blog_categories(['section' => 'case-study']); ?>

    <?php perch_blog_categories(['section' => 'posts']); ?>

    Is it possible to list the categories on a per section basis, or am I doing something wrong?

    Many thanks

  • drewm

    Approved the thread.
  • Sorry - that should have read

    <?php perch_blog_categories(array(

    'section' => 'case-study',

    )); ?>

    The categories are correct for the section are correct, but the count includes all the blogs - not just the ones within the section. And additionally, on clicking the category link, it lists all the blog posts, not just the ones within the section for that category.

    Is this possible with Perch?