Support » Plugins » Fold Category List for 2.3.1

  • codesmithsf


    Greetings WP Community,

    I recently upgraded a site from 2.0 to 2.3.1. They use Web Space Works excellent Fold Category List plugin. Unfortunately it doesn’t look a 2.3.1 version exists yet so I made the necessary changes to get it to work. It’s numbered as version 1.2 (unofficially). Hope this is useful for folks. It should work for 2.3 as well. It’s not been extensively tested – any comments or problems welcome.

    You can download it here:
    Fold Category Lists for 2.3.1

    This work was done under contract for Splunk in San Francisco.

    Justin Fraser
    Web Developer

Viewing 14 replies - 1 through 14 (of 14 total)
  • Justin, that absolutely rules. Trying to get child categories to display sensibly in 2.3.1 was seeming quite impossible until I discovered your modded plug-in. (How I miss the ‘children’ argument from the now-depreciated wp_list_cats function!)

    Now child categories are hidden unless visiting a parent category. This cleans up my sidebar and makes for more intelligent browsing through 30+ categories.


    How exactly do you get this plugin to work?
    I replaced the wp_list in my sidebar and I see no changes.

    Once you’ve installed and activated the plugin you’ll need to modify sidebar.php to call the main function. I’m not sure what all the options are (check the WebSpaceWorks site for more details) but here’s the snippet from my sidebar.php file:

    //standard 2.3.1 category call...
    //...replaced with the Fold Category List function call
    wswwpx_fold_category_list ("hide_empty=1&optioncount=1");

    The sidebar.php file is located at wp_content/themes/default/sidebar.php

    Terrific Justin, many thanks.

    One very small change:
    $exclusions .= ‘ AND term_ID <> ‘ . intval($excat) . ‘ ‘;

    needs to be amended to:
    $exclusions .= ‘ AND t.term_ID <> ‘ . intval($excat) . ‘ ‘;

    to make this parameter work.


    I am curious how you got this plug-in to work.

    when i try it, it only gives back ‘no categories’. Could it be template related?

    The wp-list function of my template says:

    <?php wp_list_cats(‘sort_column=name&optioncount=1&hierarchical=0’); ?>

    and i changed this too:


    $exclusions .= ‘ AND term_ID <> ‘ . intval($excat) . ‘ ‘;


    $exclusions .= ‘ AND t.term_ID <> ‘ . intval($excat) . ‘ ‘;

    Any help is very much appreciated. 🙁
    Thanks, Toto

    @mystifier – Thanks for the fix. I’ve included it in the plugin as version 1.2.1 and updated the download link above. So you now can you use &exclude= followed by a comma delimited list of category ids to exclude certain categories from showing up.

    wswwpx_fold_category_list ("hide_empty=1&optioncount=1&exclude=2,3");

    @deeplook – Have you updated your sidebar.php to include the call to wswwpx_fold_category_list?

    Hi codesmithsf,

    yes i think so. I don’t have any clue about this php stuff but the programmer did it all for me. But all i was able to see on the nav bar was “No Cotagories”.

    He said that it could be due to my table prefix cause i don’t use the standart wp_ one.

    Thanks for revving this plugin, codesmithsf! I wish WP had built-in category folding, but since it doesn’t this is the best I’ve found, and I’d be very sad if it broke! (To be fair, WP is missing so little that I want that it’s really not much hardship to have to figure out the little bits that aren’t there in the default install, so I can’t really complain.)

    I ended up commenting out the following line in my copy:

    $sort_column = 'term_'.$sort_column;

    …so that I could continue my long-time call to this plugin’s function:


    …since without doing so it tries to sort on term_name, which is a nonexistent column.

    I guess I’d have to use sort_column=term_id rather than sort_column=id if I wanted to sort by ID, but since I don’t, I can live with that. 🙂

    Ok I figured out the problem with my site and getting it to work. If you are using widgets and you want this plugin to work, you need to edit the widgets.php file located in the wp-includes folder. I had to change line 647 from
    <?php wp_list_categories($cat_args . ‘&title_li=’); ?>
    <?php wswwpx_fold_category_list($cat_args . ‘&title_li=’); ?>

    and now it works great!


    I’m a newbie here & want to use category as described above.
    I’ve located the category call in sidebar.php & changed it to wswwpx_fold_category_list call

    However, I can’t locate the $exclusion parameter.
    Am I looking at the wrong place?

    I use widgets & my site is at


    For anyone looking I have now rolled Justin’s mods into an ‘official’ release of Fold Page List, and extended beyond them to support some of the new arguments and default sort that are in the latest versions of WP.

    This new version remains compatible with previous WP versions of WP as well, so no need to maintain two different versions of the plugin.

    Get the new version from the Fold Category List Support page.



    Hello Rob,

    Thanks for your reply.

    I installed the plugins but had to deactivate it as the ‘category’ selection didn’t display the selected category.

    I use wordpress and sandbox.



    Can you be more specific… how are you calling the plugin?

    I have tested it here on 2.3.1 and all is working as expected.

    Need more info.

    You can contact me via the email in the header of the plugin.



    Hello Rob,

    I’ve posted a reply to your email as suggested by you.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Fold Category List for 2.3.1’ is closed to new replies.