WordPress.org

Ready to get started?Download WordPress

Forums

Only Show Categories with More than 1 Post (1 post)

  1. MrKush
    Member
    Posted 5 years ago #

    I have about 1,000 categories on my site. Most of them only have 1 post apiece, but the important categories have multiple posts.

    Can anybody think of a way to display only those categories that have greater than 1 post?

    Here's the calling code in the sidebar currently showing all categories:

    <div class="sidebar-box">
    <h3><?php _e('Categories'); ?></h3>
    <ul class="list">
    <?php wp_list_categories('orderby=slug&show_count=1&use_desc_for_title=0&title_li='); ?>
    </ul>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic