• Hi,

    i am using get posts to show posts on my front page.

    I want to show a div on the bottom of the page if the category my news-posts are stored in is empty. Is there a way to revert this?

    <?php if(get_category('10')->category_count > 0) { ?>

    I am trying to achieve, “if category is 10 with zero posts show”.

    Any ideas?

    Ty

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show a div is Category is empty’ is closed to new replies.