• Since the upgrade to WordPress 4.4 both my production and development servers don’t exclude all category IDs passed via the exclude parameter.

    For example this code (IDs are examples):
    $catOptions = array(‘depth’ => 1, ‘orderby’ => ‘count’, ‘title_li’=> ”, ‘exclude’=>’1,12,24,45’ );
    wp_list_categories( $catOptions );

    Will still output ID 12 on my development server and 12 and 24 on my production server. Switching to different ways of trying to exclude these categories sometimes removes them (though causes issues with not getting exactly the data I need).

    Manually building this list via get_categories() does work and all the passed IDs are excluded (this is the temporary fix that I’ve added to my theme).

    Not sure what is causing this behaviour but the IDs that are still included (despite being passed via exclude) are consistently the same. No matter the order of the IDs or the amount of passed IDs. So far I haven’t noticed any errors that I can trace to the wp_list_category() method.

    If WP developers want/need more information please contact me via the email address listed in this profile. I can provide more data, code, and run database queries for you.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘wp_list_categories doesn't exclude all passed IDs’ is closed to new replies.