Category heading to display only if there are posts in the category
-
I′m using two loops on a page to display posts from two different categories. Above each is the title of the category, which I only want to display if there actually is posts in the category.
Putting the title inside the loop just results in it getting repeated for each post (of course…).
I need a simple if statement or something to only display the heading if there is posts in that category. Does anyone know what code I need?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Category heading to display only if there are posts in the category’ is closed to new replies.