Display Subcategory If Category Page Has Children
-
So I’m not that great at coding, but I came up with a template for my category archive page that I want to display the subcategories of the current category if there are any, if not just display all the posts.
First: the IF/ELSE to check if the category has children doesn’t seem to be coming back as true. I created a subcategory and populated it, but it’s not triggering on the parent category page.
Second: I can’t seem to get it to select and display the child categories. Not sure if what I put in the array would work or not.
It doesn’t seem to be working and I can’t figure it out. Please help.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Display Subcategory If Category Page Has Children’ is closed to new replies.