categories – Filtering blog posts by category

Question

I’m pretty new to theme development, and trying to put together a new theme.

On my site, I’d like to set up some categories for the various blog posts. Easy enough. Then, I’d like to provide the user with a menu option that would take them to a page showing all posts that match only that specific category.

I have this working after making some tweaks to the index.php file, which is acting as my blog index – but I’d like to keep this as it is, and then have separate pages that filter the index of posts by category. So there might be a “Movies” index page, and a “Directors” index page.

I tried creating a new Page which had a template that would check the post categories .. but I think the bit I’m missing, is how to get a list of all actual blog posts from within a “Page”.

0
MrB 1 year 2021-12-02T05:26:33-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse