The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Listing posts in groups (1 post)

  1. eightdotthree
    Posted 11 years ago #

    On my archive pages I need to list the content in category groups. In order to do that I use "rewind_posts();" and run multiple loops like the one below.

    while (have_posts()) : the_post();
    if (in_category('8')) {
    include "includes/post.php";

    Now, when there is no content in that category it is an empty space. And if I do an else statement in my if(in_category('8')) conditional I get as many lines as there are total posts.

    Is there a way for me to say, if there are no posts in a category, to display a message?


Topic Closed

This topic has been closed to new replies.

About this Topic