Check to see if category has no posts
Can anyone provide me with some insight as to how I can check to see if a category has posts. I am not trying to simply list categories.
I would like to set up some sort of conditional statement where if a specific category is empty (or has no posts) then I wouldn’t display anything.
So for instance:
If category X is not null (has posts), then echo “YZ”.
- The topic ‘Check to see if category has no posts’ is closed to new replies.