Reputation: 1183
I am kinda unlucky to find a proper solution in order to display posts by their category. I made a page template that should be supposted to be used in order to display posts by category.
Lets say there is a page "Cats" and page "Dogs" and the same named categories for posts are created and assigned depending on either it is cats or dogs.
How to loop through that?
It should follow dynamics to loop posts of category that is named the same as page title(all those pages using same page template). This should solve the case when you need new page for new category and you don't want to dig into the code and so on.
I would really appreciate the help. Thanks in forward!
Upvotes: 0
Views: 447
Reputation: 1418
If you follow the WordPress template hierarchy, you simply need to name a template file with the category name.
http://codex.wordpress.org/Category_Templates
Upvotes: 1