While adding a few test categories and posts to the website so that we have something to work on when changing the css and layout files, we quickly noticed that as standard, wordpress shows all the sub-category posts when you have clicked on the parent category, something that we didn’t want. For example, clicking on the parent category “where to stay” showed the post under “where to stay” and all the posts from all the sub-categories, such as cottages, parks, hotelsetc all in one list.
Searching the web for a solution quickly came up trumps with a template trick, all thats needed is a couple of lines added to your archive.php or category.php pages. Instead of copying someone elses work visit http://lonewolf-online.net/computers/knowledgebase/wordpress-not-show-posts-of-subcategory for an excellent guide.
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
You must log in to post a comment.