List a post’s subcategories per category
-
I’ve set up WordPress as a CMS for audio cassette MP3 rips. Each MP3 is assigned many subcategories within major categories. For example, one category is “Year” and the subcategories are “1996” and “1997”; another category is “Genre” and the subcategories are “Techno” and “Trance” and “Hardcore”. A tape will often feature many genres so both “Hardcore” and “Techno” might be assigned to one post.
By default WordPress displays a post’s subcategories at the bottom of post. These subcategories are displayed in a seemingly random order which is confusing and disorganized. I’d like the subcategories at the bottom of the post to appear like this:
— YEAR: 1996 Genres: Hardcore, Techno —
I’d like the subcategories to be clickable to take the user to that subcategory’s full list of posts.
I already list subcategories in my sidebar with this command:
<?php wp_list_cats('sort_column=name&optioncount=0&use_desc_for_title=0&child_of=12'); ?>
Can a similar command be issued that will show only the subcategories in one category related to the currently viewed post?
- The topic ‘List a post’s subcategories per category’ is closed to new replies.