WordPress.org

Ready to get started?Download WordPress

Forums

Issue with categories - displaying too many (2 posts)

  1. Adam
    Member
    Posted 1 year ago #

    So if I have, on a new installation: Categories of Uncategorised and Apples, then write a new blog with Apples as the category and view that post - The categories at the bottom of the page are: Uncategorised and Apples.

    My code is as follows:

    $aisis_category_list = array(
    	   'orderby' => 'id',
    	   'order' => 'ASC',
    	   'style' => 'none',
    	   'title_li'=> '',
    );

    Then I do:

    wp_list_categories($aisis_category_list);

    Why am I not getting the specific category I selected back as the only category?

    note: on rare occasions I only get "uncategorised" back as the category for that post when I am 100% sure I chose only apples.

  2. birgire
    Member
    Posted 1 year ago #

    try to add this option

    'hide_empty'         => 1,

    into the $aisis_category_list option array.

Topic Closed

This topic has been closed to new replies.

About this Topic