I need category links to display list of sub-cats, not posts
-
I need a hack/method/code-snippet/help to change what displays when someone clicks on a category in the main dropdown menu.
Basically we have a 3 tiered category structure where only tier 3 has articles. Here’s the outline:
Chapters ( First tier and the title of the menu tab)
– Category One (2nd level, no articles, contains sub-cats list only)
— Sub Cat One (3rd level, contains articles)
— Sub Cat Two (3rd level, contains articles)
– Category Two (2nd level, no articles, contains sub-cats list only)
— Sub Cat One (3rd level, contains articles)
— Sub Cat Two (3rd level, contains articles)So, when someone clicks on Chapters we want it to display all the 2nd level ‘Categories’ and not the all the posts (which it does by default). Furthermore, if someone clicks on ‘Category One’ then we’d want it to display all the sub-cats within Category One, not the posts. Only when they click on ‘Sub Cat …’ would the results be posts.
In general ‘logic’ it would be something like:
if Level One is clicked & if Level One has categories – show categories
if Level Two is clicked & if Level Two has categories – show categories
If Level Three is clicked & if Level Three has categories -show categories – else show postsThe categories would be displayed as a ul and hyperlinked so when clicked on they would show the proper sub-cat structure OR the posts if it’s the last level in the chain.
Does anyone know ANY WAY to do this? A plugin that does it? Or, do you know of (or are you) an expert with WordPress coding to write this functionality?
- The topic ‘I need category links to display list of sub-cats, not posts’ is closed to new replies.