Hide text based on the existance of category-posts?
-
Hi there,
I have defined a set of categories on my site, and I wish to post a PAGE that explains these categories. However, I would like the page to only show the text IF there are any posts for those categories.
So, as long as I haven’t written any posts and marked them as CategoryOne, the description for this text will be hidden. But as soon as I publish a blogentry with that category, it is shown.
I’m thinking (with no WP-coding knowledge, so this is just mashup-code) something like this:
[IF WP-doesexist-check(‘CategoryOne’]
{
Category One (title)
This is the first category, and this is some text explaining it – and this text is only visible if there are any blogentries marked with Category One
}[IF WP-doesexist-check(‘CategoryTwo’]
{
Category Two (title)
This is the second category, and this is some text explaining it – and this text is only visible if there are any blogentries marked with Category Two
}Is this at all possible, or does there exist any plugins that will enable me to do something like this?
- The topic ‘Hide text based on the existance of category-posts?’ is closed to new replies.