I’m looking for a way to list only the parent post categories as links in the header of my home page. I know I can exclude specific child categories or include only specific categories in wp_list_categories, but I’d vastly prefer the list to be dynamic, so that I don’t have to update the header code if someone creates a new parent or child category.
I’ve been searching for a solution to this, and it seems there are a few but they’re specific to pages only and not posts. Any one got a solution to how to omit any post category with a parent from a list?
- The topic ‘Exclude child categories from POST listing’ is closed to new replies.