Multiple Post Categories PLUS Parent Categories
-
I have a site where there are events that have categories attached to them. I want to be able to filter the events by the categories by using the slugs as CSS classes. Problem is the filter is limited to top-level categories and events can have multiple categories attached to them.
For instance, the categories could look like this:
–Dance
–Music
—-Pop
—-Rock
–TheatreWhat I’m aiming for is to be able to handle it if a user selected “Dance” and “Rock” and have the CSS classes of “category-dance”, “category-rock”, AND “category-music”.
The
post_class()
does fine for getting the multiple categories taken care of (showing “category-dance” and “category-rock”), but I’m struggling to figure out how to add the top-level parent category (“category-music”) to the list.I’m sorry, but the site is currently in a dev environment and not publicly accessible. ??
Do you have any suggestions that might help?
- The topic ‘Multiple Post Categories PLUS Parent Categories’ is closed to new replies.