Tim TrottTim TrottThe time is always right to do what is right
WordPress Folding Category List

WordPress Folding Category List

By , Friday 27th May 2011 in WordPress 349 Comments


Folding Category List is a Wordpress widget that will show a category list that expands as you click into each sub-level. Since only the top level categories and sub-menus of the current category are shown, you will save a lot of space on your sidebar for other widgets. The list can be shown as a horizontal drop down menu or a vertical accordion style menu, both with cool jQuery animations.

A lot has changed in the WordPress world since I first created this plug-in in 2007; WordPress 2.8, custom menus out the box, custom post types, e-commerce and even jQuery. Since then I have been maintaining this old code trying to keep up with that latest and greatest, but it is becoming increasingly difficult and so I have made the decision to retire this plug-in.

As your blog gets more and more posts you will inevitably create more categories to keep them organised. Eventually your categories will take up more room on your screen and scroll across many pages. I work on one blog which has over 350 categories and with this number the standard WordPress category list is the height of three or four screens - any content below this is lost!

The beautiful origami crane represents longevity and peace.


Key features

  • jQuery Animation: Use Suckerfish or Superfish to animate drop down menus! -- js included in plugin, just activate from control panel!
  • jQuery Animation: Use Simple jQuery Accordion to animate vertical menus! -- js included in plugin, just activate from control panel!
  • SEO friendly: Add nofollow and descriptions to links.
  • Multi-widget: Have as many lists as you need.
  • Multi-category: If posts are in multiple categories, you can still control which one to expand, or expand all of them.
  • International: Plugin is compatible with translation plugins (qTranslate).
  • Control: Change order by category name, id, description, post count or use My Category Order plugin for total control.
  • Pages: Expand category list on pages using custom fields.
  • Style: There are lots of different options for CSS tags allowing designers to create unique menus.


Latest Version & Download

The latest version of FoCaL is 2.0.6 (02/02/2013)

You can download FoCaL directly from this site, or from the WordPress plugin repository.

Upgrading to 2.0.x

Since multi-widget administration has been overhauled, it may be necessary to reconfigure settings definitions should the plugin not be able to automatically do this for you. In most cases all you have to do is "save" the widget in the widgets screen and this will be enough to update the database.

If you have used the PHP code to add the widget to your page, you will have to make a slight amendment. The parameter "number" in the $instance array has been renamed to "definition". Please refer to the advanced usage guide for details on PHP usage.

The change was required as the old system was a bit backwards, having to select/create a "setting definition" from the widget and configure it in the admin page. This has been reversed, so that now you create and configure from the admin screen and just select the appropriate one from the widget.

Sorry for the inconvenience this may cause, but it'll be better in the long run and a requirement for some things I have in the pipeline for this plugin.

Changes since previous version:

  • Redeveloped multi-widget administration
  • Suckerfish and Superfish support with jQuery
  • Accordion style menus with jQuery
  • Add custom html before and after menu
  • Override category title and/or URL
  • Bug Fixed:
    • Showing before and after title when title empty
    • Showing of empty categories with private entries



Installation and Configuration

Download and extract the zip file to your WordPress plugin folder and activate in the control centre. You then should have a widget listed under Appearance ⇒ Widgets which you can add to your sidebar. All configuration is now done through the Settings ⇒ FoCaL menu option (see below). Alternatively, you can install the widget directly from the plugins screen.

Once the plugin is activated, head over to the FoCaL configuration screen and setup a settings definition.

Settings Definitions

A settings definition is a configuration that is used by a widget (or widgets). Each widget must link to a definition. Definitions are configured through the Settings ⇒ FoCaL menu option. The options are self-explanatory and have in-line help. Once a definition has been created you can add a widget to a sidebar and select the definition from the options dialogue.

Using the Priority List

To setup a prioritised list, simply enter a comma separated list of category ID's in the order you wish to expand. If the post is not a member of the first category in the list it will check the second and third etc... If none is found it will expand the first category of the post with the lowest ID.

This plugin will look at the category hierarchy, so you can specify a parent category to expand if a post is a member of any of its child categories.

Custom Fields

You can also expand and highlight an item on the list when viewing a page. Simply create a custom field for the page called "category" and give it a value equal to the numerical ID of the category to expand. This works for posts as well - you can force a single post to expand any category you like, just create a custom field called category and insert the numerical id of the category to expand.

Creating Child Categories

To create a child category in WordPress, either create a new category or edit and existing one, and change the "category parent" to the category that is to be the parent. Your category will now be shown indented from the parent.

Wordpress Folding Category List
WordPress Folding Category List

No Widget Support?

If you do not have widgets enabled on your sidebar, or if you choose to include the FoCaL in a non-widget area (header or footer for example) you can use this code to include the folding category list manually:

$focal = new FoldingCategoryList();
$focal->widget($args, $instance);

PHP variable $args contains an array of sidebar arguments, such as before_title and after_title. Please refer to the WordPress codex on these arguments.

PHP variable $instance should contain information about the instance of the widget you are trying to show. I know it's a bit awkward at the moment, I'll try and tidy this a bit, but you need to create an array of two elements: the first the title of the widget and second the setting definition name.


$focal = new FoldingCategoryList();
$args = array(
    'before_widget' => '<li>',
    'after_widget'  => '</li>',
    'before_title'  => '<h2 class="widgettitle">',
    'after_title'   => '</h2>'
$instance = array(
    'title' => 'Navigation Menu',
    'definition' => 'default' // name of the setting definition
$focal->widget($args, $instance);


Should you choose to uninstall this widget you can simply use the uninstall option from the settings page and then disable or delete the plugin. This will delete the cache and settings records for this widget from WordPress database. To uninstall a previous version (<=0.7.2) you will need to manually delete three records from the wp_options table where option_name is widget_lwfcl, widget_lwfcl-cache and widget_lwfcl-parental.



Each type of node on the tree has its own CSS class to allow great flexibility in the way the focal tree is displayed. Below is a quick list of the CSS classes and the elements.

  • ul.FoldingCategoryList - The root list class for the list
  • ul.nodeLevel0 - The root node level
  • ul.nodeLevel1 - The first level of child categories
  • ul.nodeLevel2 - The second level of child categories (you get the idea...)
  • li#cat-XX - You can enable each li to have an id containing the unique category id (cat-1, cat-45, cat-321 etc)
  • li.selected - The item that is selected (*)
  • a.focalLinkSelected - The link item that is selected
  • li.haschildren - This category has child categories (*)
  • li.nochildren - This category does not have any children (*)
  • li.selectedparent - This item is a parent or grandparent of the selected item (*)
  • (*) - These items can be set to show on the 'li' tag, the 'a' tag or a 'span' tag.


Please note: The exact CSS required will depend on the theme you are using. These examples may need to be modified to work with your theme.

I am going to assume that all ul, ol and li CSS selectors have been reset:

ul, ol, li {margin:0;padding:0;list-style:none}

You should now be able to apply the following CSS for these effects:

/* Makes selected category highlighted */
.focalLinkSelected {color:black;font-weight:bold}
/* Add a &amp;middot; (&middot;) before sub category items. Replace B7 with <a href="http://timtrott.co.uk/ascii-chart/">ascii code for any symbol</a> */
.FoldingCategoryList li ul li:before {content:"B7 20";}
/* Indent Child Category */
.FoldingCategoryList li ul {margin-left:6px} /* nodeLevel1 */
.FoldingCategoryList li ul li ul {margin-left:6px} /* nodeLevel2 */
/* or */
.nodeLevel1 {margin-left:6px}
.nodeLevel2 {margin-left:6px}
/* Change colour of indent items */
.nodeLevel1 a {color:red}
.nodeLevel2 a {color:white}
.nodeLevel3 a {color:blue}
/* Add a picture icon to child categories */
.nodeLevel1 li {background-image: url('image.png'); background-repeat:no-repeat; padding-left:12px; background-position:top left}

The only limit to the CSS effects you can apply is that of your imagination.


Advanced Usage

The widget supports a number of WordPress filters and actions so that you can control the style and layout of items. You can even override category title and URLs if you wish, or add in items to the menu (as seen on the horizontal menu at the top of this page).

Adding HTML Items

You can add a simple link before or after the menu using the Additional Links section of the admin panel, however you can add more complex links (or any HTML) using PHP and hooking into the plugin. Like the example on this page, you can add a search bar to the list and have it styled the same as the list.

There are two functions that you can use, addMenuItemBeforeCategory and addMenuItemAfterCategory. Both take the same parameters:

addMenuItemBeforeCategory($html_content, $sequence)

$html_content can be any valid html which the plugin will be contained within <li></li> tags. $sequence is an integer value which you can use to order the items.


$focal = new FoldingCategoryList();
$args = array(
'before_widget' => '',
'after_widget'  => '',
'before_title'  => '',
'after_title'   => ''
$instance = array(
'title' => '',
'definition' => 'timtrott'
$focal->addMenuItemBeforeCategory('<a href="/">Home</a>', 10);
$focal->addMenuItemBeforeCategory('<a href="/about/">About</a>', 20);
$focal->addMenuItemAfterCategory('<a href="/portfolio/">Portfolio</a>', 10);
$focal->addMenuItemAfterCategory('<form method="get" id="searchform" action="">
<div><input type="text" class="text" size="18" value="'.wp_specialchars($s, 1).'" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</form>', 20);
$focal->widget($args, $instance);

Override Category Title and/or URL

Two filters have been added so that you may override the category title and/or the URL the link goes to. There could be many reasons for wanting to do this, and in the main horizontal menu on this page I have used both - the Tutorials menu item links to a page rather than the category list, while the sub-items link to the sub-category listings.


This code would go into your themes functions.php

function redirect_category($url) 
if ($url == 'http://timtrott.co.uk/wordpress-folding-category-list/')
  $url = 'http://timtrott.co.uk/category/internet/web/wordpress/';
else if ($url == 'http://timtrott.co.uk/category/internet/web/wordpress/')
  $url = 'http://timtrott.co.uk/wordpress-folding-category-list/';
return $url;
add_filter('focal_cat_link_url', 'redirect_category', 0);

A similar function exists for changing the category title - you may have a very long category title that needs to be shorter on the menu.

function rename_category($title) 
if ($title == 'Your  Very Long Category Title')
  $title = 'Short Title';
return $title;
add_filter('focal_cattitle', 'rename_category', 0);


Any Questions?

If you have any questions, problems, queries or suggestions, please use the form below and I'll do my best to get back to you as soon as I can. You can also leave feedback on the WordPress Forums, although I do not check there very regularly.




Share this post


349 thoughts on “WordPress Folding Category List”
  1. mohib

    The reason seems to be that you are not restricting the SQL search of the wp_term_taxonomy table to "taxonomy=category" and are also counting rows from other taxonomies. Rather than counting the number of times posts are listed in the table, wouldn't it be easier to simply use the "count" field of the wp_term_taxonomy table. Nevertheless, I added:

    AND $wpdb->term_taxonomy.taxonomy='category'

    to the SQL query and it started to give the correct counts.

  2. Mohib

    Great plugin, but I just noticed some of the counts are off. For example in the following category I have 12 posts (and 12 are reported in the Admin side), but FoCal reports 14 in the category list in the margin:


    I got echoed the SQL query you construct and it returns 14 when I run it directly against the database and the two extra posts are:


    However as you can see, these posts don't contain the above category and they don't show up in any other list of the posts by category in the Admin client (nor, as you can see, in the category list for the above posts). It seems that wp_term_taxonomy has the extra categories listed for the above posts, although it seems only FoCal is finding them.

    I'm using your latest version (2.0.6) on WordPress 3.4.2 (I just reloaded 2.0.4 and noticed the problem was there too) and I've got it set to show unique post counts.

  3. Trevor

    Hey there,
    I started using this plug-in a few weeks ago on a friend's site and it was working great. I've run into a slight snag however.

    I have a handful of categories and then 15 sub-categories under each one of them. The subcategories list alphabetically except when I add new ones, they are at the bottom of the list -- even though they're in the correct order in the dashboard.

    I've tried a number of things, including deleting and rebuilding the plug-in cache with no success.

    Could you offer any suggestions?

  4. Tim Trott
    Tim Trott

    Thanks four your support Lou Anne; I have however removed donations from this site.

  5. Lou Anne McKeefery

    Thanks for updating the focal plugin, I wanted to make a donation to you but when I click the link from wordpress.org to donate I don't see a way to do so.

    Let me know and I'll give you a little something for you efforts and hope that I'm not the only one.

    Lou Anne

  6. ann

    Hi every time i reply to a comment i get this huge repeated message saying the following...

    Missing argument 2 for wpdb::prepare(), called in /home/content/95/7537995/html/public_html/wp-content/plugins/folding-category-widget/focal_wp28.php on line 980 and defined in /home/content/95/7537995/html/public_html/wp-includes/wp-db.php on line 990 Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/95/7537995/html/public_html/wp-content/plugins/folding-category-widget/focal_wp28.php on line 980 and defined in /home/content/95/7537995/html/public_html/wp-includes/wp-db.php on line 990 Warning: Missing argument 2 for wpdb::prepare(), called in /home/content/95/7537995/html/public_html/wp-content/plugins/folding-category-widget/focal_wp28.php on line 980 and defined in /home/content/95/7537995/html/public_html/wp-includes/wp-db.php on line 990

  7. John Scarry

    FYI, my php error logs have this message.

    [23-Jan-2013 16:12:16 UTC] PHP Warning: Missing argument 2 for wpdb::prepare(), called in /srv/www/LLSC/parks/wp-content/plugins/folding-category-widget/focal_wp28.php on line 980 and defined in /srv/www/LLSC/parks/wp-includes/wp-db.php on line 990

    I think I made it go away by adding NULL this line.

    $querystr = $wpdb->prepare($querystr, NULL);

    By the way, my user really likes your plugin.

  8. Michael Thompson

    Hey, just wanted to shoot through a message to you, because I just started using FoCaL and received an error.

    I didn't save the error message for you (apologies for that) but my brother managed to fix it. Here are the changes:

    On lines 52 and 61 of wp32.php
    $this->add_action('wp_footer', array(&$this, 'accordian_activator'))
    $this->add_action('wp_footer', 'accordian_activator');

    Happy Holidays  :) 

  9. Tim Trott
    Tim Trott

    Setting definition can be created from the Settings->FoCaL menu then selected in the widget.

  10. Tim Trott
    Tim Trott

    Hi Elan,

    This menu is a prototype Focal version 2 which is based on the built in WordPress menu system. It is still in development and should be released early in the New Year with WordPress 3.5 support.


  11. Elan

    The drop down category menu you have on the upper right corner of this page under "Tutorials" (displaying parent categories only, then showing child categories only when each individual parent cat. is clicked on) is EXACTLY what I'm looking for for the wordpress site I'm now building. I tried to download your FoCal plugin, but it does not work at all the way this menu on your website here is working. Obviously that's why you retired it? Is there any other plugin you know of that can do something similar in terms of displaying only the parent categories until they are clicked on (or perhaps hovered over) to reveal their corresponding child categories?
    Thanks for any help.

  12. Ifiokobong

    I have installed and activated the WordPress Folding Category List on my wordpress 3.4.1 version but in the setting defination setup, the instructions says Select a definition from the list but the drop down only shows "default" and i do not know how to set a new definition. please help

  13. Karl

    Just tested plugin, seems solid, thanks for sharing!

    We're using WPML for multiple languages and the plugin doesn't seem to show sub-categories for the second language. WPML works differently from qTranslate, in that it creates separate categories (or pages and posts) and links them.

    It does show my main categories in the second language, but as mentioned, doesn't seem to list subcategories. Are there any workarounds to this you can think of?

    Thanks! Karl

  14. MarcK

    Greetings from germany!

    Whatever I do, in the section "Category Expansion" I can't save anything other than "Expand all".

    Whe I switch to "normal" and save the settings, it still stands at Expand all...

    And so I don't get a folding menu.  :-( 

  15. Lizette

    It seems your plugin is really great but m theme is not widget aware and I don't know ANYTHING about PHP so I have NO IDEA how to install this. What was described up there completely confounds me, don't know what to do with it.

  16. mick

    I'd love if this worked with custom post types and taxonomies
    have you looked into this at all?

  17. Folding box

    Folding category is friendly with serch enginee?

  18. Rachel Inbar

    2 problems:

    1) I don't know where to find the css. I saw it when I first installed the plugin, but now I can't find it (I would like to put a + before categories that have sub-categories) and/or

    2) I can get the animation to work when using jQuery Accordian, but all it does is makes each category a block and then puts them together, kind of like lego, without line breaks between them...

    The site, btw, is in Hebrew, but I don't believe that it has anything to do with the problem...

    Thank you,

  19. andré

    Maybe. If "Include Javascript" is selected, this message is displayed:
    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Array' was given in /home/arquivos/public_html/wp-includes/plugin.php on line 405.
    Is this a script error?

  20. Tim Trott

    It sounds like it could be a Javascript error on the page preventing either the accordion or superfish plugins from being loaded. Do you have any script errors on the page?

  21. Andi

    February 25, 2012 at 12:02 am

    Hey Tim,
    Thanks for the explanations, but this did not solve the problem with the expansion of the categories list on the sidebar. When any animation is selected, the list on widget remains fully expanded, no animation at all. In my case the problem arose with the upgrade to wordpress 3.3.1.

    I've the same problem since updated to 3.1.1, can you provide solution / update for this case. Thx Andi

  22. andré

    Hey Tim,
    Thanks for the explanations, but this did not solve the problem with the expansion of the categories list on the sidebar. When any animation is selected, the list on widget remains fully expanded, no animation at all. In my case the problem arose with the upgrade to wordpress 3.3.1.

  23. Tim Trott

    Hi André

    This does indeed help, and it is by design. For the Superfish or Accordion jQuery animations for function they need the whole category list to be sent to the browser so if either of these two options are selected category expansion is set to expand all. If the category expansion was not set correctly there would be no animation.

    Hope that helps clear things up


  24. andré

    In my case "category expansion" is set in "expand all" just
    when "jQuery animations" - Superfish menu or jQuery Accordian - are selected. If they are not selected, the "category expansion" works correctly.
    I hope this information helps you with the problem.

  25. Board Directory


    I'm quite a fan of this plugin and urge you to continue development of it.


  26. karen

    I believe your plugin is causing this error at the bottom of my content page. Either that or Superfish? I am on WordPress 3.31. I like the plugin I would like to keep it. If I deactivate the plugin, the error goes away. Thank you for looking into this.

    `Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Array' was given in /home/essent11/public_html/southernarizonaguide.com/wp-includes/plugin.php on line 405`

  27. Tim Trott

    A problem may exist as there are two reports, I am however unable to replicate it. Is the problem just with saving the "Category Expansion" setting, or with all settings?

    Have you more than one definition listed in the drop down list, does this change when the settings are changed and is this the definition selected for the widget?

  28. Boa


    there is a problem with Focal's option panel: I can't set my favourite option for the "Category Expansion" setting: it will use always "Expand all", while I want to use "Normal".
    Could You verify and fix this problem?
    Thank You!

    I'm using Focal 2.0.4 on wordpress 3.3.1
    Until 2.0.2 everything was fine.

  29. Gail

    Just upgraded to Version 2.0.4 and the menu is fully expanded and the "Category Expansion" setting keeps reverting to "expand all" when I set to any other setting and click save.

  30. Tim Trott

    I'm still looking at the errors for WP 3.3 but unable to replicate this behaviour.

    Please can someone provide additional information as to what they do to trigger the error.


  31. Jason

    I have installed the plug-in, activated it, and inserted it into a widget, saved it in the widget. I have adjusted "Settings".

    Nothing appears in the sidebar.

    There are no "Setting Definitions" listed in the drop down menu and nothing happens when I attempt to use the "New Definition" option. Can you assist? Thanks.

  32. Forum Directory

    Any plans on getting this plugin updated to meet the changes of the latest wordpress version 3.3?

    I posted already the error message on the wordpress forum.


  33. mine

    I really think your work is fantastic. I have tested it in my next blogsite but I have found a problem with the users access plugin I use (this is Role Scoper): the problem is that there isn't any defined restriction for the users! That is, I can't make these 2 plugins work together.
    Is there any solution?
    Thank you so much!

  34. Mats


    first of all: Bloody great plugin! Exactly what I needed! You saved my website  :) 
    Now to the question: Since I'm new to wordpress I don't really know where to ask this. If I would like a thumbnail picture(for ex 48x48) connected to each category and then show that in the menulist. Is that possible? If it is, can it be done easily? I'm not a great programmer but can at least comprehend code if I get guided :P. Thanks in advance and sorry if it is the wrong channel to ask here.

  35. Ilan

    The options menu doesn't look like it updates anything.
    I am running wordpres 3.2.1

    Anyone else having issues with this plugin(2.0.2) and the version of wordpress

  36. Martin


    Very nice plugin. One question:
    When I uncheck 'Show empty categories' the categories with custom post type data are not shown.

    How is that possible?


  37. Jarle

    Hi there, love your plugin. Looks like a very nice way to add expanding and collapsable menues. BUT, I have the latest version (downloaded from WordPress), version 2.0.2 and I have version 3.0.1 of "My category order", and I can't get them to work together. (using WordPress 3.2.1).

    I see there have been troubles in the past, has that happened again?

    I would love to pay a little bit to have the order function included in your plugin, let me know if you decide to make a premium version of this plugin. My category order and Folding Category List in one would have been great.

    PS: If you have a tip for me how to fix the problem with the ordering of the menu items not working with both plugins installed, please let me know.

  38. Watch Series Now

    Hey great plugin and all, but I'm having the same issue. I have the latest 2.02 version but it does NOT work with W3 Total Cache. No matter what my settings are I cannot use JS Minify at all. I made sure to exclude Superfish.js and Accordian.js etc. Even with no .js entered for minify, if it is enabled your plugin stops working. Please tell me how to fix this?? Thanks in advance!.

  39. Briand

    Any clue how i can get this working with wp-ecommerce. They use categories but apparently they function differently as your app wont recognize them.

  40. Dave Conroy

    Hello, I am having problems making this work the way I am after. I would like to have it list my categories (parent) in horizontal mode, and the child categories underneath it. Is this possible?

  41. Richard

    Loving the plug-in, it's almost exactly what I'm looking for... the only thing I need is it to be able to display sub-categories when you are in one of the child categories of that sub-category. Is this possible?

    Thanks in advance


  42. Mike

    Any chance you can give the code to having this work with wp-ecommerce. The problem im having is they are product categories but they arent recognized by focal because im assuming they arent true categories.

  43. Tim Trott

    Hi Michael,

    There was a slight bug in the plugin, which has been fixed in 2.0.2, that may have been causing the problem.

    Also, if Accordion or Superfish menus are enabled, it will automatically set expand all to true.

  44. Tim Trott

    Hi Josh,

    There was a slight bug in the plugin, which has been fixed in 2.0.2

  45. Tim Trott

    My Category Order plugin was recently updated and broke the way FoCaL orders the list. This has now been fixed in 2.0.2.

  46. Tim Trott


    Do these child categories have posts in them? By default empty categories are hidden, but you can enable the option to "show empty categories" in the settings.

  47. Tim Trott

    Latest version of FoCaL (2.0.2 ) should fix this issue. WordPress 3 introduced a slightly different way of counting posts.

  48. Tim Trott

    Which part of the plugin does not work in IE6?

    FoCaL itself is server side, so I presume you mean the jQuery accordion or superfish menus?

    If you can provide a little more info I can investigate.

  49. Tim Trott


    My Category Order has slightly changed the way it orders categories from when I added support. I have amended focal 2.0.2 to include these changes and this function is now working again.

  50. Tim Trott

    This should be fixed in 2.0.2

  51. Tim Trott


    As with show empty categories, post counts have been reported incorrectly due to changes in get_categories.

    This issue should now be fixed in 2.0.2

  52. Tim Trott


    The latest update 2.0.2 should fix this issue.

    Issue was with WordPress get_categories function and hide_empty=1 being default.

  53. Michael P

    Hi, nice plugin, something that have been looking for for ages for our blogs, just 1 issue so far, unable to get it working as the dropdown box in settings with "normal""expand post cats"and "expand all" is reverting to "expand all" after every save, which Im am guessing is forcing all the cats to expand and thus not working, have tried everything but cant fix this, do you think a wp 3.2 version issue? any advice would be appreciated, cheers

  54. Josh

    The settings page is not saving any changes I make. Not sure what I could be doing wrong as this seems pretty straightforward to me.

  55. Russ Miller

    Great plugin!

    However, I noticed that FoCal is no longer working in 3.2.1.

  56. conkio


    I've installed your plugin, and have also installed the My Category Order plugin since it is listed in the Key Features. My Category Order is working, I tried it with the standard menu system and it does indeed use the order that I set. Unfortunately it is not the same with your plugin.

    Is there something else I should be changing or adding to the code to get it to work with FoCaL? I have selected it in the Order By field in the FoCaL settings page.


  57. Yim

    Hi Tim,
    I'm using WordPress 3.2.1, I realize the note around "Order by" ("nb: if selecting My Category Order you must manually rebuild the cache after changing the order."). Also, I did tried and checked on http://wordpress.org/support/topic/plugin-folding-category-list-focal-focal-and-category-order for guide. I did save changes after selecting My Category Order in Order By section and click on Rebuild Cache and then only click on Save Changes under the Use Description. But I fail to make it order by as what I preset in My Category Order.

    Hope that you can assist me in this =(

    Many thanks!

  58. David

    Nice plugin! However, whenever I add a new category that has a parent category, the new category doesn't show up in the category menu on our site. I've added categories and haven't had any problems with those, but it's just the child categories that aren't showing up. What can I do?

    Thank you!

  59. Martin

    Can't say it works for me ... it worked fine up until about 80 posts or so then it stopped, new posts don't seem to be added to the postcount, new children categories (with new posts) don't show up in the navigation bar ... Tried deleting/rebuilding cache: no effect. Tried not using cache at all, no effect. Newest wordpress version, and as far as wordpress is concerned all the posts are fine and the categories count is correct ... FoCal's numbers don't match wordpress'

  60. clayton

    This very good plugin, thanks, but functions "show empty category" does not work...((

  61. savas

    Unfortunately the plugin does not work in IE6  :( 

  62. kalypse


    I really like your plugin. I use it together with the 'My Category Order' (3.0.1) plugin. Few weeks ago I updated to WordPress 3.1.3 and also updated to Folding Category List to 2.0.1. Since then the categories are no longer ordered with the order defined by 'My Category Order'.

    To be sure that no other plugin causes this problem I made a fresh install of WordPress with few articles in two categories and also there the custom ordering did not work.

    I tested the 'My Category Order' plugin on its own (without Folding Category List) and it still works. It just doesn't work together with FoCaL.

    Is there any solution for this?
    I would really like to go on using these two plugins together.

    Many thanks in advance

  63. Eddie G

    (fire be hot mon)

    Tim, I'm having a similar experience as Winsti. All the desired subcategories are there, all are linked to a Category Archive page. That much is fine. However there is no expansion and no display of posts.

    Category Expansion is set to Normal (default). Superfish is not enabled. Accordian is not enabled. Behavior is the same in FF5, MSIE8 and Chrome 12.

    I suspect it is a setup issue but I am dumbfounded.


  64. ivblog

    Hi, Tim!
    I choose "show empty categories" and and nothing happens... empty categories not displayed, please help!

  65. youli

    hello Tim. I have a question, my post count does not display,click on the post will show,but post count is 0

  66. clayton

    Option «Show empty categories» does not work  :(  I tried a different profile settings, but nothing helps ...

  67. Tim Trott

    Have you any posts in the categories, or checked "show empty categories" in the settings?

    Are you trying to use the javascript animated or the standard post back version?

    Please supply a little more information to help diagnose the problem


  68. Winsti

    Hi Tim, Thanks for this great plugin.
    However I've installed it and try to get it working!
    I use a clean install of worpress, theme twenty Ten, made some categaries, sub-categories.
    But it is not folding?

    I could use a hint on this one.


  69. Santi

    I do not quite understand how to get the categories into the menu, like you do here... Can you give me any pointers?

  70. Tim Trott

    Hi Alyson,

    In the configuration page, in Individual Widgets next to Setting Definitions please can you click on "load definition" with default selected in the drop down list.

    I have found a bug and I think this may help you.

  71. Alyson

    Hello,I look here again.

    Well, i have some problems.

    When i update for last release, my menu is gone.
    I save again in widget and is back.

    But, I have one category and this have 4 other categories.
    before they showed only 4 ,I just need them.
    Now this shows it pretty hard.
    I mark the option to include only these and to show empty categories as before but once everything is gone.

    In my configuration page, in Individual Widgets and Root Category , i have no options to select in dropdown.

    I mark Show empty categories.
    And Only the categories ticked below will be Included in FoCaL, i select this 4 categories.

    Note: every time I redo the cache, the options checked, they disappear

  72. Tim Trott

    Hi Alyson,

    I included an upgrade notice for the release but for some reason WordPress does not seem to want to show it. I have also just added it to the installation section above.

    All you need to do is "save" the widget in the widgets screen.

    Sorry for the mixup.


  73. Alyson

    With your last release, my menu is gone and dotn go back again , i try configuration page, but not happen.

  74. Nicholas

    Did You get an answer or figure out how to do that? We need to do the exact same thing.

  75. Nicholas

    Love you plugin but is it possible to hide the title of the menu if the category does not have any sub categories? We are using it to show only the sub categories on a page in the category sidebar but when no sub categories are present we would like to hide the title.

  76. Salarju

    Great plugin!

    I have detected a small bug, not realy important:
    When there are 0 posts, the focal configuration page draws wrong the Root Category drop down list.
    I solved this adding the option "hide_empty=0" to the "wp_dropdown_categories" call.
    It also solves when you add the first post.

  77. doris

    Works great on WP 3.01 - we integrated it with shopperpress, as their navigation was not what we wanted.
    This is a user friendly solution and very easy to implement.

    Thank you kindly and keep up the good work!

  78. Barrt

    I am trying to use the .haschildren class to place a circle in front of each category that has children. I have tried placing both ul and li after the .haschildren. It seems to have no effect. Is there some other syntax required with the .haschildren class.

  79. csoftAdmin

    I want my word-press post be in specific category like Country - State - City. But my list is toooooo big so it causes the loading time so higher.

    I want to modify this category section like(in -> Add New Post).

    On the new post it only shows the country list when I click on the country then it loads the states for that parent country. And when I clicked on the state then it loads the city list.

    I search for the plugin which suits my requirement but I fail If you know any plugin which help me then please recommend me.

    Or give me some suggestion how I make this king of plugin from start.


  80. Alyson

    ok got it!

    with option show children categories only

    VERY NICE plugin, grats

  81. Alyson

    ok , now it's work.

    i'm using version 3.0.5
    please update in repository this news about compatibility.

    And tell me...have any way to show only sub categories when whe are in some category?

    example: i have one category and this one have 5 subcategories
    And this five subcategories, have others subs.

    When i enter in one subcategory and it have more subs, show only your subs in sidebar

    And not all menu.

  82. zeaks

    @David he basically just added borders and colors to it.

    .FoldingCategoryList a {
    border-left: 5px solid red;
    border-top: 1px solid ;
    border-top: red;
    text-decoration: none;
    padding-left: 5px;

    .FoldingCategoryList a:hover{
    color: #ffffff;
    border-left: 5px solid #blue;
    background-color: #blue;
    text-decoration: none;

    something like this.

  83. Francois

    Hi, Tim, nice plugin. I have searched on this forum an answer to my question but i didn't find anything. Here it is :

    - I'm using the "show child categories only" with my unique widget. I'm using a title for this widget (for example,"Categories"). I would like this title not to display when there is no children category for the active category. Any simple way to do this ?

    Thanks a lot

  84. Sven Mayer


    First, good Plugin!

    But I need a hint, how to rebuild cache remotely by script...


  85. Angela (Cottage Magpie)

    Hi Tim! Your plugin looks just like what I was looking for! I have one question. I am wondering if there's any kind of offset for it? What I want to have for my navigation is the sections across the top, and then the subsection navigation in the sidebar (using the folding menu).

    So, for example, let's say across the top is Gardening, Decorating, Home Improvement... (my main categories).

    Then if you click Gardening, on the side bar I would want to have the subcategories for Gardening with the folding menu--say it has Garden Design, Maintenance Tips, Plant Files, etc.., and then clicking any of those gives the expanded sub-subcategories for that area, using your plugin.

    Any chance the plugin can do that? Or that you know of a way to do it? I'm fairly new to WordPress but have a technical background.

    Thank you so much!

    ~Angela  :-) 

  86. Lucian

    @Tim Really great plugin but I have the same problem like @Mark. I managed somehow to list few posts, but after if I tried to add to other sub-categories it won't show up in navigation anymore.
    Any help would be greatly appreciated.

    More details here:

  87. Pete

    I figured out that WP is using the archive template to display the results. Thanks again for the great plugin!

  88. Pete

    Hi Tim,

    Thanks for the great plugin. It wins hands down against all others I've tried. One question: which template (if any) is FoCal using to return the results? I looked through the code, but I am unable to determine how you are rendering the list of posts within each category. Any help is greatly appreciated!


  89. Michael

    Thanks for the reply - please keep me posted if you solve the problem.

  90. Tim Trott

    Hi Wuschba

    Unfortunately since 1.3.0 the widgets have been converted to the new WordPress API which uses a completely different method for controlling widgets. I'm not sure if there is an easy way around this.


  91. Tim Trott

    I'm not sure about using this in the admin backend as it currently requires a page reload to expand the categories. I have been working on a jQuery enabled version to expand categories when clicked on, so maybe I could use that.

  92. Tim Trott

    Hi Justin

    I've been having a lot of problems with IE at the moment. It seems that it is forcibly using it's own cache and not reloading from the server.

    Please try pressing Ctrl+F5 to force a page reload and see if that fixes it.


  93. Wuschba

    Hello! When updating from version 1.0.2 to 1.3.2, the widget which holded my categories is vanishing. I have to update about 50 blogs, so setting this widget manually would be a big deal. It seams that the name of the Widget changed from FoCaL 1 to FoCaL - any idea how to update the database to work with the new name?

  94. Michael

    Hey - great plugin

    I would like to use the folding categories in the backend (administration) as well. So that when you edit a post the categories are folded as in the widget.

    It this possible, perhaps with a hard fix?


  95. Justin

    Why is it that when I have post count turned off, it is still displaying next to my categories, i.e., "category xxx (8)". Also, it's only happening in Explorer browsers. Your help on this would be much appreciated.



  96. thecookiemonster

    WOW. friggin awesome!

  97. Penelope

    Hi Tim,

    That worked perfectly. I just gave FoCaL a 5-star vote at wordpress.org.

    Thank you very much!

  98. Tim Trott

    Hi Penelope,

    I think I understand your question. You could try changing line 418 in focal_wp28.php from

    "$description = htmlspecialchars($Edescription);"


    "$description = strip_tags($Edescription);"

    (without quotes)

    See if that fixes your problem.


  99. Penelope

    Hi, I'm using Rich Category Editor to make my category descriptions "pretty" and am wondering if there is a way to strip the HTML tags from the category description in the title popup when mousing over the category name. The default WordPress category widget does this, but I can't get it to show the title without (description) with FoCaL or Collapsing Categories widgets. Thanks for the great plugin!


  100. Alex

    Thanks Tim,
    I had given up on FoCal but am pleased by a morning surprise of an upgrade. No problems now saving anything...

  101. Tim Trott

    Problem with the code, it's fixed now in 1.3.1.

    Sorry about that

  102. BarTech

    I've try to use FoCal with WordPress MU but plugin admin menu is not saving changes. Please help.

  103. Alex

    Ok, So I set the ID of my FOCAL widget to 2 and then unchecked the uncategorized category and checked another category that I wanted to exclude and then it worked for saving my individual category settings. Also I deleted my cache at some point during this process and that might have helped.

    I still can't save my settings when I try to uncheck the include category descriptions in the top three options. It reloads the page and keeps the category descriptions checked. Any ideas?

  104. Alex

    I changed the setting ID of the FOCAL widget and still no luck in saving any settings...

  105. Alex

    I am having trouble simply saving my settings in the FoCal settings page. It just resets to the default settings every time I try to save.
    Any ideas? This is being done on a fresh install of WPMU and BuddyPress.

  106. Alex

    I am having trouble simply saving my settings in the FoCal settings page. I just add

  107. Alex

    I am having this same problem. Could you explain to me more how to fix it??

  108. marjinal

    hi there .thanks for plugin, Does anybody know if tis script is compatible with WordPress 2.9 ? Thanks in advance for any help on this! Regards

  109. Mark

    I am in love with your plugin, and set it up on my new 2.9.2 site, http://www.VirtualProfessors.com. After posting the first post, it worked great! Then I made the second post, and it will not show anything from that post in the Categories widget. It's not the cache, as I've cleared it, deleted it, told the plugin not to use it... And I know it's not the cache as I made changes to the categories in the first article, and those showed up.

    Can you think of why this might occur? I really want to use this fantastic plugin.

  110. photowork

    Thank you for a great plugin. I’m very appreciate it. Cheers!

  111. Tim Trott

    Hi Alex, I'm working on integrating the WordPress users and roles to the plugin - currently it only allows an Administrator to do anything. This will be addressed in the next release.

  112. Tim Trott

    Sorry I haven't updated my plugin for a while, I feel bad about it but I have been so busy so far this year. I'm just getting my breath back having climbed a mountain, and this Easter weekend I will be working hard on the next release and answering all your questions.

    Thank you for your patience


  113. David

    Fantastic plugin! One question - I am associating categories to my pages through a separate plugin. How do I get your plugin to count the # pages associated with each category so the number appears next to the category in the side bar? I've been trying to figure it out but I can't. Any help would be great!

  114. Alex

    Hey Tim,

    is there any way, that a user with Editor role can go into the settings of FoCal, I setup an Editor role and gave him the possibility to edit some Plugins under Settings, but only FoCal doesn't show up in the settings list.

    Also, there is only an option to exclude categories from the navigation, would it also be possible to have an option to include certain categories?

    Thanks a lot!

  115. David


    I'm a visitor from Belgium. I recently started to make a website with WordPress about some items i'm interested in.
    My catogory-list is growing, so I try to find a solution.

    I came on your site en saw a demo (http://www.timtrott.co.uk/)

    I'm very interested in de category-list at this site. Can you tell me how to accomplish this?
    Can you help me?

  116. bojecin

    Hi, I' dloev to use this plugin together with Category & Page I c o n s so each cat can have an assigne icon but seem like they don't work togetehr, any idea how to make this happen? Thanks

  117. Ronald


    I solved it myself. Just don't start with ID = '0'.


  118. Ronald

    Hi Tim,

    I installed your plugin, great...

    I only have one problem and that is that WP won't save changes I made in the settings page.

    I use WP 2.9.2 and Focal 1.2.0.


  119. Derrick

    Is there a way to limit the number of displayed categories. For example: if my site has 50 top level categories but I want to only display the 30 most popular with an option to expand the visible list, is that possible?

  120. Alex

    Cool Tim, that does the trick! Thanks a billion!


  121. Tim Trott

    A quick fix for now is to disable the cache, I'm working on multi language cache support.

  122. Tim Trott

    Hi Ivan,

    You could try disabling the cache, that way the category name will be put through the translation plugin each time a page is loaded.

    I'll work on a way of storing a different cache per language for a future release.


  123. Tim Trott

    Hi Malcolm,

    It isn't possible at the moment, however a similar feature for pages could be made to work for posts as well. I'll look into it.


  124. Alex

    Hi Tim, did you check the problem with qtranslate, which xSEOn was mentioning. Would be great to have a fix. Appreciate your great work!

  125. Malcolm

    Hi Tim,

    Thanks for the reply. I understand that. But is there any way to assign a different priority to different posts? In your example, suppose I had two posts assigned to both Music and DVDs, but on one post I wanted to make Music the main category, and on the other, I wanted to make DVD the main category. Is there any way to do this?

    I guess what I want to do is to assign a specific 'selected ' category for each page. I have a feeling this isn't possible in FoL at the moment.

  126. Tim Trott

    Hi Malcolm

    You should be able to use the category priority feature for this. Lets say you had a category called Books with an Id of 1, DVD's = 2, Music = 3 and TV = 4. A post is a member of Music and DVD's by default DVD's is expanded because it has the lowest ID. If you enter 3 into the category priority list, then Music will be expanded. You can enter 2,4,1,3 so that DVD is expanded first, if a post isn't in DVD category it then looks to see if it is in TV, then Books and so on.

    Hope that helps

  127. Malcolm

    Hi Tim,

    I was wondering if there is any way in FoL to choose which category to expand for each post. In other words, I want to assign a different 'main category' for each post and exand that one only when viewing that post.

    Any help you can give will be greatly appreciated! Thanks.

  128. Kim Wesley

    Hi Tim,

    Do you happen to have an estimated date for the update?

    Best Wishes,


  129. DStall

    I installed FoCal plugin on WP 2.7 and it worked like a charm, only displaying main categories and expanding child categories once main categories were clicked.

    Am trying to use it with same template on WP 2.9.1, but when I click on category it links to "domain".infocategory/"name of category, as if my domain is a subdmain of "infocategory.

    This produces message "Server Not Found".

  130. Kim Wesley

    Do you have any idea when the next release might come out?



  131. Tim Trott

    This is a very interesting problem! I'll have a think about this.

  132. Tim Trott

    Hi Kim,

    I need to implement Roles and Capabilities for this to work. It something I've been meaning to do but never got round to it because it didn't seem to be a problem.

    I've added to the fixes in the next release.


  133. Kim Wesley

    I'm using WordPress MU 2.8.6. On the blogs I've created, I am using the FoCal plugin combined with My Category Order. When I publish a post from an admin account, everything works fine. If I publish from an author account, the My Category Order defaults to alphabetical order and the numbers after the categories to indicate how many posts have been written in that category does not update. If I publish from an editor account, the numbers do update, but the My Category Order still defaults back to alphabetical. If I log in to admin and rebuild the cache in FoCal, it goes back to how it's supposed to look. Will I always have to rebuild the cache after every posting?

    I'm don't have much technical knowledge with coding the WordPress theme. I used Artisteer 2 to create it. But, if you point me in the right direction I can probably fix it.

    Best Wishes,


  134. xSEOn

    Great plugin! But when used on multilingual blogs (using qTranslate) changing the language is not supported. The Category list remains always on only one of the languages (the language used by the browser I think).
    For example, if you have enabled English, German and Russian you'll have the possibility to provide 3 different names for your categories, corresponding to each language. But your categories list will always be shown in only one of them, let's say English, regardless of switching between the languages.
    Is there a possible workaround?

  135. Alex

    Hey Tim,

    just FYI, if you don't have any other category excluded and try to un-tick the default category from the exclude list, it will activate it again, after saving the settings. Only after I exclude another category and un-tick the default category, it stays un-ticked.

    Using WP 2.9.1 and latest FoCal Plugin

  136. Kristen

    I just wanted to say that I was having the same issues as Nick (even after just having upgraded to 2.9.1), and your code modification worked like a charm! Thank you for the help!

  137. Nick Ogbourne

    Hi Tim,

    Thanks for that. That fixed it.
    There is one presumably related problem in the FoCal control panel. The Widget Number drop down in the Set controls lists the instances of the widget twice. That is 1,2,3,1,2,3. It doesn't seem to affect the way it works on the site now, though.

    All done - getting close to midnight your time - hope your 2010 is a good one.

    Regards and Thanks


  138. Tim Trott

    Hi Nick,

    Alas there is a problem with 2.9, will be fixed when Wp 2.9.1 is released. In the mean time the problem lies in wp23_folding_cats.php.

    Line 20 should read "if ( strpos($wp_version, '2.8') !== false || strpos($wp_version, '2.9') !== false )" to fix

  139. Nick Ogbourne

    Back again. I have deactivated FoCal, deleted it and used your code to find FoCal records in the wp_options table. (I sort of gathered from your page that this shouldn't have been necessary but the records were still there.)

    I then reinstalled FoCal but still NBG! Oddly, WordPress remembered that I had previously asked for 3 FoCal Widgets - I had assumed that the uninstal and db table clean up would have got rid of that.

    Still stuck.



  140. Nick Ogbourne

    I should have added - it was working fine with multiple widgets on 2.8. It only went belly up when I upgraded to 2.9


  141. Nick Ogbourne

    Hi Tim,

    I have just checked that and I am running the latest FoCal 1.1.0 and wordPress 2.9. When you say "‘How many Folding Category widgets would you like?’ is no longer supported in 2.8+" does that mean that I can't add more than one instance on the sidebar? There certainly is the option to add more instances on the settings panel - it just doesn 't work!

    I had better see if I can find some ref on your site. Worst case is to use some CSS to achieve the effect I guess but I would like to get to the bottom of it!



  142. Tim Trott

    Hi James,

    Not quite sure what you are asking here, maybe the comment system messed up your indents. You could try ".FoldingCategoryList, .FoldingCategoryList li {margin:0;padding:0}" see if that works?

  143. Tim Trott

    Hi John,

    I'm not aware of any incompatibility with the plugin and 2.9. I've been testing 2.9 and 2.9.1 beta without any problems.

    Can you be specific about the error?

  144. Tim Trott

    Hi Nick, It sounds like you are using an old version of the plugin. ‘How many Folding Category widgets would you like?’ is no longer supported in 2.8+ so if you are seeing this option you will have to upgrade to the latest version.

    Hope that helps


  145. Nick Ogbourne


    I use FoCal to display three sets of widgets. I have just upgraded to WordPress 2.9 and while I can set 'How many Folding Category widgets would you like?' to 3 and configure those three instances in Setup FoCal, only a single instance of the widget appears to drag to the sidebar. Dragging that one then doesn't leave another instance to place on the sidebar.

    I have uninstalled and reinstalled the plug in and don't think that I have forgotten anything.

    any ideas?



  146. James

    How do you prevent indents? I have tried changing all css to 0px? but nothing helps. this is what i want

    Cat 1
    Sub 1
    Sub 2

    NOT cat 1
    sub 1
    sub 2

    thank you in advanced

  147. John VG

    Hi, thanks a lot for developing the FoCal plugin. I am very happy with it.

    I encountered a little problem, however, when trying to do the upgrade to WP 2.9. After that the website crashed and the error message said it was because of the plugin.

    Is there an incompatibility problem with 2.9 indeed? (Else, there must be some funny problem only with my installation.) But if there is an incompatibility, do you plan to mend it? Of course, I hope the answer is twice yes.


  148. Tim Trott

    Hi Joe,

    I'm looking into this problem, but for the mean time you can manually reload the data by using the refresh cache option in the settings page.

    I will get the auto refresh working for the next release soon.


  149. Joe

    Hi Tim,

    Since upgrading to the latest version of FoCal my widget is not updating when I add new posts. It only shows the original (4) in brackets that I added when I first installed the previous version.

    I've tried deactivating, deleting and reinstalling FoCal but it still only shows (4), even though there are more posts.

    I should add when clicking a category in the widget, it does show all the posts, it's just the number next to the category name that's not updating.

    Any idea's why this is happening?


  150. Bart van Poll

    Hi Tim,

    How is it going with the new version? Anxiously waiting for the next release!

    Thanks, Bart

  151. TarmoS

    Thank you for your time with plugin. Works great but I have a problem. I use categorise us main navigation and would like to see short explaining text for every category.

    Web: http://www.digistep.ee/

    Is it possible to add those small texts for each categorie?

    Thanks.  :) 

  152. Bart van Poll

    @helplesI Don't talk about respect, if you don't have any respect yourself. The development of this plugin is done voluntarily. You should be thankful that you can use it!

  153. Bart van Poll

    That's great Tim, thanks!

  154. Elizabeth Hammond

    Sorry, my code was eaten. Here's an example of a page with the category of 138:

  155. Elizabeth Hammond

    Thank you for your response, and thanks for putting so much work into this excellent plugin. My client has decided that he likes the focal menu the way it is.

    Strangely, my pages, which have category custom fields to determine where the focal menu opens up, no longer trigger the focal menu. When viewing these pages, I only get one top category called "blogs". It worked perfectly at the beginning of the week, but I must have made a change that affected them. I'm so frustrated, I worked for 4 hours yesterday trying to find a work around, but I found nothing. I know it's possible but my php isn't very advanced. I put the following in the loop:

    ID, "category", true);
    echo $category;

    Is that something that should work? Any help is much appreciated.

  156. Tim Trott

    It's as easy as un-ticking the box and saving the settings!

    Hope that helps.

  157. Tim Trott

    Thanks for the heads up Andreas, I'll get this into a future version!

  158. Tim Trott

    I have been thinking along those lines. I am experimenting with some jQuery and AJAX to achieve this kind of effect.

  159. Tim Trott

    Hello there!

    The allow translation option was initially designed for qTranslate. I can check out your suggested plugin to see how it deals with the translation and see if it is possible to add that function.

  160. Tim Trott

    Hi Laszlo, You can do this fairly easily using CSS. Have a look at http://www.vincecutting.co.uk/fancy-unordered-lists-bullet-points-using-css.html. All you need to do is apply the styles there to the .selected li elements.

    I'm going to be updating my demo sites fairly soon, one of them will be doing this so you can see exactly where the css is.

  161. Tim Trott

    Hi Jeff, You should be able to increase the font size with a little bit of CSS

    Give me a shout if you're not familiar with this and I will try and walk you through it.

  162. Tim Trott

    Hi Jeff, I need to look into the post count property, since it seems to be counting more than just posts.

  163. Tim Trott

    Plugin version was incompatible with WordPress 2.8. latest versions (>1.1) are now compatible with all WordPress versions > 2.3.

  164. Tim Trott

    Hi Bart,

    I will look into this problem as it has been reported before. I think maybe it counts Category, Tag, Post and Page as one in the same.

    I'll be issuing an update soon.

  165. Tim Trott

    Thank you for pointing this out to me.

    As some people may be aware, I have been suffering ill health for most of this year. I know it's not a good excuse, but I hope that this is all behind me now. I have just restyled the site and given it a little makeover; this will be followed by lots of updates and new content.

    I am very sorry to people I may have annoyed by my lack of responses and updates.

    I am also redoing the demo sites to make better use of the plugin in action.

  166. Tim Trott

    Roger, I'm not sure what you mean here. Where is the icon showing? In the admin screen or in the template? Is this a theme setting?

  167. Tim Trott

    Hi Elizabeth, The functionality you describe does not exist in the plugin at the moment, and off the top of my head I think it would be a little difficult to pull off. If you can give me more details of how this should behave I can have a look for you.

  168. Tim Trott

    Hi shaun, I've not used WordPress MU before. I'll have to look into this as I don't have a clue why it won't work just yet.

  169. Tim Trott

    Hi Levani, There isn't a template tag available at the moment, but you can insert a short snippet of PHP to to the job.

    Please see http://timtrott.co.uk/focal/#install for instructions.

  170. Tim Trott

    Hi Frank, sorry for the delay getting back to you. The instructions were for the old version of the plugin, I have updated this page to reflect changes.


  171. Frank

    After upgrading to the latest version my FoCal doesn't seem work when added manually to the template - any hints?

  172. shaun

    I Can't seem to get it to work on a wordpress 2.8.4 MU site with buddypress. Under Individual Widgets The Widget Number does not populate and just shows a blank box with no options.

  173. Elizabeth Hammond

    I have a client who would like the individual posts to show up under the categories in the sidebar widget. I don't think that functionality exists, but I'm wondering if I there is a way to expand upon the php to make the posts display?

  174. Roger

    How can I change the category icon in your plugin? Suppossedly, in the theme I am using, the category icon is to be displayed as a FOLDER, not a COGWHEEL as your plugin displays it. The COGWHELL is used for admin settings. I've also download and tried the CATEGORY ICON PLUGIN to assign the icon, but that had no effect.

    Where in your coding can I change this?


  175. helpless


    i came across your site after long google searches through lots of pages. i believe, if someone is serious he should take care of what is he is doing or not doing. you made something that will be usefull for everybody. but i see that you hardly answer the questions asked by the users. another issue is, there is not even a screenshot showing this plugin in use. what the worst and funniest thing is, you refer to web sites for live demo of your plugin and none of them use it in fact.

    JUST BE respectful to the visitors coming to your site to test this piece of code and update some pages in this site.

  176. Bart van Poll

    Fantastic plugin Tim!

    I've been using it with a lot of pleasure. But recently, I noticed the post count is (very) incorrect.

    It says there's 47 articles, but there's actually only 1 article (in 3 child categories).

    I'me using the latest version (1.1.0) and tried re-building cache, and re-installation of the complete plugin....

    Do you have an idea what could be wrong?

    I also posted this on the support forum for the plugin, but did not get a reply. Maybe somebody can help me here or there!

    Thanks a lot! Bart

  177. Jeff

    Focal Cache had to be disabled because it doubles the number count whenever the WP-SuperCache plugin is enabled. Anyways, you're right, each time I mass import I have to disable Focal. Luckily that doesn't happen very often  :) 
    BTW, it seems v1.1.0 makes things worst (for me). My 3-column Suffusion theme (http://www.aquoid.com/news/themes/suffusion/) becomes 1-column when v1.1.0 is enabled.  :-D  I had to fallback

  178. Levani

    Thanks for the update!

  179. Tim Trott

    Hi Jeff,

    When a post is published or changed the cache is rebuilt to update post counts etc. This also gets rebuilt when categories modified, so batch modifications will be slow.

    You can either disable the plugin temporarily, or disable the automatic cache from the settings page.

  180. Rich

    Hello there,
    Is there any update on the “How many Folding Category widgets would you like? ” option is not working with WordPress 2.8.4." question? I am having the exact same issue with this version of wordpress. The plugin seems to be what I've spent days looking for but won't know until I can add a second or third.
    Let me know if there is any news and thank you,

  181. Jeff

    The last few days I've rebuilt my blog over a dozen times with different combination of plugins and themes, hoping to find the culprit that caused WordPress XML importing so darn slow. Sadly, I have now come to the conclusion that this plugin was the cause of the slowdowns.

    Each of my WordPress XML import file is about 6Mb big, contains 3000 posts and each post consists of either 2 or 3 category levels. My blog was using WordPress v2.8.4 and FoCal v1.0.2. The whole blog has 6800 posts.

    When FoCal is disabled, XML importing is very fast, importing a 6Mb XML file containing 3000 posts (each with 3 category levels, and 1 tag) in less than 3 minutes.

    When FoCal is enabled, importing the same 6Mb file becomes extremely slow and aborting (or crashing) at least 33 times (yes, I counted).

    Also, I had trouble adding more than 1 FoCal widget. It appears this is a bug.

    I am not expecting anything; I just thought you might be interested to know.


  182. Jenny

    Well, I found out what the problem was - it was my theme. I'm using another theme and your plugin works great!

    Thank you!

  183. Jenny

    How can I indent the list? I don't see it anywhere in the settings.

    Thank you!

  184. Chilli-Alex

    Thanks for this really great plugin, much appreciated - really sorted out my homepage.  :) 

  185. Jeff

    Excellent plugin, the best collapse-able category plugin I have tried. Thanks!

    One query though....how to change font size? The default is rather small...hard on the eyes.

  186. Jean-Pierre Lévesque

    Just to make sure, are you aware that the
    "How many Folding Category widgets would you like? " option is not working with WordPress 2.8.4.

    We can only add 1 instance of the widget into the sidebar...

    I'm using: Folding Category List (FoCaL) (Version 1.0.2)

    Regards !

  187. Laszlo

    This FC is wery nice! Would like tell me, how can I to mark the sub category With "-" characters?

    Cat 1
    - Subcat a
    - Subcat b
    Cat 2
    Cat 3
    - Subcat c
    Cat 4

    Can you help me?

    Regards, Laszlo

  188. Tim Trott

    Good News Everybody!

    I've finally worked out the new WordPress API and I'm in the process of testing the new version compatible with 2.8+

    Just doing some testing and tidying up / documentation then I'll issue the update.

    Thanks for being patient

  189. Levani

    I don't use widgets on my site, is there any template tag available?


  190. Tim Trott

    Unfortunately the new API is causing a few more problems than I thought. I haven't given up, but it's taking more time than anticipated.

    Thanks for your patience

  191. theman

    First of all great work! So many options. You must have spent hours work on this! thanks

    But... I am using "languageswitcher" from poplarware.com/languageplugin.html and it doesn't seem to work. I checked allow translation but nothing happens? Somebody any ideas?

    thanks again.

  192. François

    Hello !
    This plugin is excellent !
    I have a suggestion for development.... !
    if you have selected, in CSS Style "Explorer style and + and - symbol" and, if you clicked on a category, and this category has child, "click" just expand category (to show/display child) but no change the active category. Interest ? Now, to show the childs categories, is slow (because open archive category - is slow - , and, before, expand child categories) and with this solution is very fast. Maybe it's very difficult.... and jquery/ajax requiert ?
    Thank you !

  193. Not A Niche

    That would be great Tim, if you could fix the problem in the new version. I can't think of any features to implement in FoCal, everything is perfect!

    Hope you feeling better!

  194. Tim Trott

    I'm sorry for the delays in sorting this problem out. Over the past month or two I have been suffering ill health and a few other problems. Hopefully I'm back on my feet again and I have started looking into this in more depth.

    WordPress 2.8.x changed the way widgets are handled. There is a new Widget API which must be used to create multiple widgets, the old way can no longer be used.

    Implementing this new API will require recoding of the FoCaL list class and will cause incompatibility with previous 2.7 and lower versions. Whilst I will make the changes required for 2.8, I will have to drop support for 2.7 and below.

    While I am making these changes, now is the time to suggest any new features or addons that you would like. I cannot promise anything, but I will try and get as much done as possible.

    Thank you for your patience with this.

    Kind Regards

  195. Lou Anne

    I am unable to see more than one focal widget on the widget screen. I have selected 2 at the end of the widget screen. I have created a 2nd focal in the setup.

    Using wp2.8 and focal version 2.3

    How do I fix this in order to use the widget more than once on the side bar?

  196. Hitendra


    Any word on my post.


  197. sur

    Hi, Could you help me?
    Updated my wp to 2.8.1 and only one focal is posible...
    I see this happened other users, is there any way tu solve it?
    The plugin is super!
    Thanks in advanced.

  198. Hitendra


    Thanks for the plugin, I am using it on WordPress 2.8, have set the plugin and also added it into my left menu bar but it does not show up. Only the title Navigation shows up in place of the categories and the list is not there.

    Even when I try adding more FoCals in my widgets page, it keeps on displaying only 1.

    Can you kindly help.



  199. Jill

    Hi! I'm also having trouble having a second Folding Category widget show up. I've just upgraded to 2.8.2 but it wasn't working in 2.8.1.

    Other than that, great plugin!

  200. Thorsten Albrecht

    Great plugin, thank you. For those who like to highlight the current category together with its parent category, just use the following css together with the FoCaL-option apply css classes to: link/anchor tags (a) :

    ------- cut -------------

    /*highlight parent category*/
    font-weight: bold;
    color: green;

    /*highlight selected child category*/
    font-weight: bold;
    color: red;

    ----------- cut ----------


  201. Maria

    I have the same problem as Tracy, Geerts and Tim.
    I cannot get more than one FoCal widget to become available.
    I’m using WordPress 2.8 and the latest version of the plugin.
    Anyone an idea to solve this issue?


  202. Chicago Guide

    I found the issue was in the page itself, not the plugin. It seems to be working ok now. For future reference to others: I think it had to do with the header function, I moved the get_header() line down the page so my custom php script on the page would run before trying to grab anything from the template.

  203. Tim Trott

    Please can you let me know the line number that is failing and I will have a look into it.


  204. Chicago Guide

    I'm using it on a wp 2.7.1 site, haven't upgraded to 2.8x yet. It is working great on the actual wordpress portion of the site. I have however created other section of the site outside of wordpress. I found instructions on how to 'wrap' the wp template around these other pages/sections so the visitor does not notice any change.

    I use this at the top of each page in these other sections.
    define('WP_USE_THEMES', false);

    /** Loads the WordPress Environment and Template */

    Unfortunately the plugin is throwing an error, "Invalid argument supplied for foreach()", in one of these non-wordpress areas.

    Any idea of why it would work in some areas but not in this one? Tips to track down what is causing the error?

  205. Sib

    Hi Tim,

    Thanks for a great plugin. I was searching for a similar widget for a while now, wish I had come across it sooner!

    I was wondering whether its possible to achieve a collapse effect on the category list, much like a treelist accordion, maybe using JS or JQuery such that hovering over (mouseover) a particular category would expose all its child nodes without having to click on it?

  206. Tim Trott

    Hmmm... I'm looking into this, but it seems that the problem is not specific to FoCal. I cannot get Simple Tags to show multiple tag clouds either.

    I'll update when I have some new information.


  207. Geert

    I have the same problem as Tracy Evans.
    I cannot get more than one FoCal widget to become available.
    I'm using WordPress 2.8 and the latest version of the plugin.
    Anyone an idea to solve this issue?

  208. Anthony

    Thank you Tim for your great plugin!!

    I'm trying to use it as a menu for a new project. But when I try to display the categories inline, I found I can't remove "".

    Would you please help me to solve it?

  209. Tracy Evans

    There appears to be an interface problem with FoCal in WP 2.8.

    I cannot get more than one FoCal widget to become available. No mater what I set the "How many Folding Category widgets would you like? " number to, only one shows up.

    This worked perfectly pre 2.8

  210. Tim Trott

    Hi Stacey, send me the url and I'll have a look for you. I won't publish the url if you don't want me to.

  211. Stacey

    Thanks Tim!

    Another question, that is some what odd!!! I have a random 1 below my FOCAL, that only appears under the FOCAL. If I send the URL are you able to have a look for me and see what I have done??


  212. jmek

    Love the built-in Explorer-style plus icons. Makes it so much easier to mimic that style.

    However, I am having a problem getting my parent categories to display the correct pages (my site is primarily pages, not posts). I've created a hierarchy of parent-child categories (just 1 child level) and added the custom "category" field with the appropriate value to all parent and child pages. The child pages work fine, but when I click on a parent category in the folding navigation tree, I get a 404 message. Any ideas what I've done wrong?

  213. Tim Trott

    Hi Stacey, you can include a focal list anywhere within a template using the code on this page:

    http://timtrott.co.uk/focal/#install (scroll down a bit until "No Widget Support?")

    Hope that helps

  214. Stacey


    I want to code this into my sidebar as opposed to using widgets. I have about 10 categories so I want to use conditional tags to call specific focal lists. Can I do this?


  215. ulle forsberg

    the plug-in doesn't work on my site, i think it the issue with 'recent post', because it works when i remove that widget. and it works when i change theme.

    i read the comment on WordPress 'Support » Plugins and Hacks Problem with Recent Posts widget' and i think i did what i should. this is where i added the lines:

    function wp_widget_recent_entries($args) {
    global $post;
    $oldpost = $post;

    if ( '%BEG_OF_TITLE%' != $args['before_title'] ) {
    if ( $output =

    code code code...

    if ( '%BEG_OF_TITLE%' != $args['before_title'] )
    wp_cache_add('widget_recent_entries', ob_get_flush(), 'widget');
    $post = $oldpost;

    did i add the lines at the correct place? what am i doing wrong? im not a programmer!

  216. luca

    hi all!

    Thanks for the amazing plugin. I wonder how I can split menu in columns (table data blocks), based on category level.

    Can you give me a hint?
    Thank you,


  217. Andreas


    sorry for my english, Im german  :-) 
    Great plugin but I had a problem with much to high counts behind the categorys in 1.0.2. I checked the function GetCount. I think there is a problem in the sql statement. In cause of this tags with the same id as the category will also be count.

    I inserted "AND $wpdb->term_taxonomy.taxonomy = 'category' as follows:

    SELECT DISTINCT $wpdb->posts.ID
    FROM $wpdb->term_taxonomy, $wpdb->posts, $wpdb->term_relationships
    WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id
    AND $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id
    AND $wpdb->term_taxonomy.term_id = $cat->term_id
    AND $wpdb->term_taxonomy.taxonomy = 'category'
    AND $wpdb->posts.post_status = 'publish'
    AND $wpdb->posts.post_type = 'post'

    Now counts are ok.


  218. paul2008

    Hello Tim,

    thank you for the plugin.
    I have one question so far:
    the post count number in parentheses for each category is located under the name of the category. This way, it takes 2 lines to list a category. How can I change it so both the category name and it's post count are on the same line?

    Please take a look at this screenshot to understand what I mean:

    Or is this a problem of my current WordPress theme?


  219. Photowork

    Great plugin, easy to use, very helpful on my blogs, thanks for share!

  220. Tim Trott

    Hi John and everyone else,

    Sorry this has caused you problems. John's solution does indeed work and a fix will be submitted shortly.


  221. John Rodriguez

    In the FoCal settings, I see that the Uncategorized category is excluded by default.

    Is there any way to include it?

  222. John Rodriguez

    It looks like it is just an issue with using short tags. I went into the server and edited php.ini to turn on short tags, and it worked fine:
    short_open_tag = On

  223. John Rodriguez

    I've been having the same issue with the plugin on a client's blog (hosted on a Windows server).

    I did some research, and found that the error might have something to do with short tags turned off (<? instead of <?php), so I edited wp23_folding_cats.php. There are 3 instances of the short tag -- lines 1147, 1151, 1158.

    I fixed the short tags, but now get a different error:
    PHP Parse error: parse error, expecting `T_FUNCTION' in C:InetpubSiteblogwp-contentpluginsfolding-category-widgetwp23_folding_cats.php on line 1343

    A weird thing is that I also have the plugin on a local test version of WordPress on my computer running WAMP. The error I get here is:
    Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in C:wampwwwwordpresswp-contentpluginsfolding-category-widgetwp23_folding_cats.php on line 1343

    I'm going to keep hacking away, and see what else comes up...

    Great plugin, by the way! I've got it working like a charm on another client's site.

  224. Martin

    Hi Henning, I am more than sure it is server type: works on Linux and does not on Windows based. It is pitty because I am forced to use windows server:(

  225. Henning

    O.K., went to another server: linux, apache2_2, mysql4, php5. IT WORKS! Whooo? Mysql4 again? O.k. mysql4 does not seem to cause the wrong behaviour. Then it might have been moving from WinXP to Linux? Any paths or other stuff the OS might have influenced?

  226. Deyan

    This plugin works great.
    If you want to use it with qTranslate plugin (more than one language) you should change line 465 from:

    $result .= '>' . $title . '';


    $result .= '>' . get_cat_name($term_id) . '';

    get_cat_name will get the category title in the current language and it will be displayed as a link. I hope that will help to somebody.


  227. Henning

    We're getting further with the debugging, I switched back to the default theme on my testing engine: still the fatal error.

    Is it possible that the error could be related to the old MySQL 4 version running?

  228. Martin

    little update
    ...me again. Tried to install plugin on localhost and it runs like a charm. Also counted brackets and it is even number. Though problem is somewhere else.

  229. Henning

    Yeah, sounds pretty likely that it is just a missing bracket or another minor typo. I'm gonna a have a look at the code too, maybe I just see it by chance.

  230. Martin

    Hi Tim, installation folders are default nevertheless I use css theme and lightbox plugin enabled. Trying to track down function brackets but it seems to be ok. Will also try to switch back to default theme and see what happens then. Thnx for your time!

  231. Tim Trott

    Hi Martin (and everybody else with this problem!) Sorry for this problem and the delay getting back to you all. I am looking into this right now, but as Henning said line 1356 is the last line of the plugin and I also see no errors. It sounds like one little function somewhere has a missing } which is going to be a pain to find.

    Are any different options being set? Different parent category, are you using a css theme?, a particular tick box? or are you using the default options?

    Sorry again!

  232. Martin

    Hi Tim, thnx for really nice plug-in nevertheless after going to version 1.0.1 I receive fatal error call for line 1356 which is at the very end of a code:
    "....line 1356
    PHP Parse error: parse error..."
    I am running PHP 5+ enabled server and cleaned up previous version tables in wp_options too. I would be grateful for help:)

  233. Henning

    Hi there!

    I actually get a fatal error when trying to active the plugin

    Parse error: parse error in E:@webrootde.tvh-tennis.v3wp-contentpluginsfolding-category-widgetwp23_folding_cats.php on line 1356

    which makes little sense because line 1356 is the last line of the plugin and I see no errors. I'm on a php5 mysql4 apache2_2 with wordpress 2.7.1 running.

    Thanks for your time,


  234. Vuron

    How can i make this plugin work with different languages (qTranslate)? Any clues?

  235. d2s

    I've been using this plugin for quite a long time, but since the last update the plugin-activation fails with this message:

    Parse error: syntax error, unexpected $end in /[path-to-my-wordpress]/wp-content/plugins/folding-category-widget/wp23_folding_cats.php on line 1356

  236. Ariel

    Oh I'm glad! Thanks so much.

  237. Tim Trott

    Hi Ariel, I've looked through the code and found that I forgot about this little bit! Thanks for pointing it out, 1.0.1 should be available soon.

  238. Tim Trott

    Hi Kimberley, I'm not sure if I am understanding correctly, but it sounds like you are trying to get pages to show in the FoCaL tree? Adding category numbers to pages will not add the page to the FoCaL list, it is intended to allow that branch of the tree to be expanded when the page is viewed.

  239. Kimberley Rivero

    Hi there- I'm trying to use FoCal in a WP 2.7 site that has lots of pages. We are using posts for Newsletters and pages for the rest, so I'm stuck with pages. My menu is getting ridiculously long so FoCal would be great.

    I installed FoCal and My Category Order but can't get my pages to show in the menu (the Newsletter shows). I tried using custom fields to assign category numbers to my pages, but still nothing. Does this work in 2.7? Am I missing something?

    I appreciate your help.

  240. Tim Trott

    I'll have a look into this.

  241. Ariel

    Thanks Tim, I double-checked but that doesn't seem to be the problem. When I check "show all categories", it shows something like:


    This example would be how it appears on category Parent1. I'd like to eliminate both Parent category names, and I thought that's what "show child categories only" would do. Am I misunderstanding its function?

    When I choose that option, nothing shows up under the navigation header at all, on pages that previously would include child categories when "all categories" was checked. Even if I add FoCaL twice, the "all categories" one will show both parent and child categories and the "child categories only" will show nothing. (Feel free to email me if you'd like a link to the page in question.)

    Both parent categories have child categories and all child categories displayed have a post. I'm using wordpress 2.7.1.

    Thanks for any help you can give!

  242. Tim Trott

    Hi Ariel, Glad you like it! "Show child categories only" will only show the child categories for the category selected. If you are on a page or single post there are no child categories to show. Let me know if this is not the case.

  243. Ariel

    Much thanks for the beautiful widget. I especially love that it can be added multiple times with different options. The configuration options are very easy to use too.

    For some reason though, I can't get the option for "show child categories only" to work. When I choose it, it just appears blank under the Navigation heading.

    I rebuilt the cache but I can't think what else to try. Any advice?

  244. Tim Trott

    Hi Christopher, It is not currently possible to include on a page or a non-widget sidebar.

    HOWEVER, later today or possibly tomorrow depending on how things go, I will be releasing 1.0.0 which does have this functionality.

  245. Christopher Murray

    Hi Tim,

    This is a fabulous piece of work; just what I need for a project I'm working on. Is there any way to put this code on a page rather than as a widget on the sidebar?


  246. Francis

    Hi Tim,

    I try to run your plugin and I would like to use the expand/collapse CSS example. I did install everything ok and when I arrived on the homepage, my + and - buttons do appear but when I click on a category, I go directly on the category page, without expanding to the subcategories and then, The CSS organization disappeared. I checked the source code and there is no more "expandable" class... I just disappeared... Did someone had already that pb and is there any issue I can get this to work ?

    Thanks a lot for yr help !


  247. Tim Trott

    Thanks Bernd, I'm in the process of writing a brand new version which I should be releasing soon. I will try and incorporate this into it.

  248. Bernd

    Patch to work with "My Categorie Order" to give Categories a manual created order.

    --- wp23_folding_cats.php 2008-12-28 12:22:02.000000000 +0100
    +++ wp23_folding_cats.php 2009-02-28 15:26:19.000000000 +0100
    @@ -279,6 +279,11 @@
    echo 'Category Name';

    + if ($lwfcl_orderby == "order")
    + echo 'Term Order';
    + else
    + echo 'Term Order';
    if ($lwfcl_orderby == "id")
    echo 'Category ID';
    @@ -472,6 +477,7 @@
    switch ($options[$number]['orderby'])
    case "name": $sortby = 1; break;
    + case "order": $sortby = 7; break;
    case "id": $sortby = 0; break;
    case "description": $sortby = 2; break;
    case "slug": $sortby = 6; break;
    @@ -624,7 +630,7 @@
    $count = getCount($item['term_id']);
    $countu = $count[1];
    $counta = $count[0];
    - $result[] = $item['term_id'] . '#|#' . $item['name'] . '#|#' . $item['description'] . '#|#' . $item['parent'] . '#|#' . $counta . '#|#' . $countu . '#|#' . $item['slug'];
    + $result[] = $item['term_id'] . '#|#' . $item['name'] . '#|#' . $item['description'] . '#|#' . $item['parent'] . '#|#' . $counta . '#|#' . $countu . '#|#' . $item['slug'] . '#|#' . $item['term_order'];

  249. Thorsten Albrecht


    one problem with "Show post count next to category": Because I am just starting with a new blog, I have only 1 article in 1 category. Your plugin says: 3 articles. (WordPress 2.7.1). Any ideas/workaround how to fix that? The count next to the default category widget shows the correct number.

    Thanks for any help


  250. Tim Trott

    Ivan, there will be a brand new version of the plugin soon, completely re-written with lots of new functionality. This should help solve your problems.

  251. Ivan

    I would like to thank the author for this great plugin. I am little confused how can i order the categories cause the plugins like "my category order" do not work with it together. Also prioritised list of ID's does not work. I entered ID's but nothing is changed. I would be grateful if the author could contact me on this matter. I am ready to donate for additional extension for folding category plugin. Thanks

  252. mACHO


    how can include this great plugin into header.php file of template (not sidebar.php)?


  253. Nick Pelling

    Hi Tim,

    Oh, and I should also mention:-
    (a) if I expand all categories, then only one of the categories is highlighted at all.
    (b) I've uninstalled and reinstalled the plugin from the latest 0.7.2 build, configured with the default settings
    (c) I'm still using PHP4 (though I also have PHP5 on the server, I can't get it working with WordPress).

    Thanks, ....Nick Pelling....

  254. Spot Cool Websites


    Just wanted you to know that Folding Cetegories has been selected as one of the five plugins for travel blogs:


    Thanks for all your work with it -- it's a really great widget!

  255. Ralf

    Today I found this great PlugIn for my MusikBlog Project (over 100 Categories, growing daily), WP2.7, Avenue Theme. If this works stable for some weeks, you can use my project as reference  ;-) 

  256. m.dz

    Thanks, very helpful plugin!!!

  257. dan


    Not sure if I am doing something wrong but I cant get this to work.

    I have downloaded, installed and activated with no problems but using the plugin I am having issues when you say "You then have a widget, which you can drag to your sidebar and configure." There is nothing I can drag and there is nothing under the Plugins me menu to allow configuration.

    How should I be configuring this plugin?


  258. Olaf

    Hi Tim

    Happy New years

    Sorry but this is translated with Google!
    I'd like your Folding Category List with widget use only, unfortunately, the categories are not manually adjust it is not possible to plug your compatible with My Categorie order to make? so that the sequence is over. Unfortunately, I know myself with php not enough.

  259. Brandi

    I have a question about the plug-in. I'm having a bit of a problem.

    I have my categories listed and the sub-categories listed, but when you hit the parent category, it takes you to a page that lists all sub-categories (child categories). Is there a way to click on the parent category and have it lead to a specific page? Or is there a way to click on the parent category and merely have it expand the sub-categories and not lead anywhere?

    Thanks so much!



    P.S. I am new to the CSS stuff so, throw me a bone  :P 

  260. jody

    First: lines 168 and 169 are duplicated in wp23_folding_cats.php - where expandall_checked is set.

    Second: I'm trying to display the categories with ALL their sub-categories initially, not just when a parent category is clicked. So, on my main page, I want the list to of categories to show ALL categories in a hierarchy. I played with the option unsuccessfully. I don't want to hack the code!

    Great plugin. Thanks for taking the time to developing it.


  261. Tim Trott

    Sorry for all this, I have no server with PHP4 to test on so I have to work things through in my head. This problem should now be resolved, but if your server is configured to show E_STRICT warnings then you may get other messages.

    I'm working on a brand new version which includes much better CSS design ability as well as several new features which should be very interesting.

    Let me know if there are further problems


  262. Nick Pelling

    Hi Tim,

    Just upgraded to your latest version (from yesterday) on my PHP 4 server, and got this:-

    Parse error: syntax error, unexpected T_STRING in [[[...]]]/wp-content/plugins/folding-category-widget/wp23_folding_cats.php on line 991

    Thanks, ....Nick Pelling....

  263. lukchin

    hi! just upgraded to 0.71 with WordPress 2.7 and got this error on activation of this plugin:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected T_STRING in /home/haven5/public_html/wp-content/plugins/folding-category-widget/wp23_folding_cats.php on line 991

  264. Daniel

    Hi. I have been looking for a widget that does exactly what your does all day! I am so excited to find it, but I get the following message when I go to activate your plugin:

    Parse error: parse error, unexpected T_STRING in /hsphere/local/home/dannybar/technologystyle.com/wp-content/plugins/folding-category-widget/wp23_folding_cats.php on line 467

    any help would be amazing.



  265. jakki

    oh, thanks man.

    really nice and cool plugin. This is really very helpful to make a user friendly blog. help to maintain categories.

  266. sourcelab

    Hello !
    Very thanks for your plugin : it is exactly what I searched !
    But I do not understand where to add/ change/ adapt the CSS code code of categories....
    In my CSS theme...?
    I am sorry, it is undoubtedly very simple...
    Thanks for your help !

  267. Nick Pelling

    i forgot to mention that if I remove the widget from the sidebar, the error messages do indeed stop appearing.

  268. Nick Pelling

    The errors only appear in the server log, the browser appears to work OK: it's only that I happened to be looking at the error log today (in connection with another mysterious plugin problem, which will probably turn out to be PHP 4-based also) that I noticed it. On the bright side, it's easy to reproduce (and it happens for all empty categories, not just the place-holder ones).

    Hmmm: perhaps a WordPress plugin for looking at your Apache error messages could be universally useful? Just a thought!  :-) 

  269. Tim Trott

    Hi Nick,

    Thank you for bringing this to my attention. I haven't seen this particular message before, but given it's nature I will be investigating this asap.

    Does this produce an error message in the browser or just in the (Apache?) log? If you temporarily disable the plugin do the messages still appear?


  270. Nick Pelling

    Hi Tim,

    Another query for you: having just looked at my error log for the first time, it turns out to be full of MySQL errors from the folding category plugin, all taking this general form:-

    ciphermysteries.com [Wed Dec 17 13:23:26 2008] [error] [client x.x.x.x] WordPress database error Table '[[[database-name]]].wp_categories' doesn't exist for query SELECT cat_ID FROM wp_categories WHERE category_nicename = 'places-of-interest' made by require, wp, wp->main, wp->query_posts, wp->build_query_string, apply_filters, call_user_func_array, cqs->custom_query_string, cqs->init, cqs->get_category, cqs->get_category_id

    In order to structure the 150-odd categories, I have introduced some empty categories, such as the "places-of-interest" category directory. And it is precisely on these empty categories that the plugin is causing MySQL to produce error messages... lots and lots of error messages.

    Even though my site is properly cached and has various stuff hardcoded into the template, the Google robot still takes over a second to load in a random page from the site. I had assumed that it was some unknowable hosting issue, but might it simply be that all these error messages are slowing the page rendering down?

    Obviously, the easy solution would be to create a fake post tagged with all these empty categories. But I thought I ought to mention it to you, as it may be masking a deeper problem.  :-) 
    Any ideas?

    Thanks, .....Nick Pelling..... // Cipher Mysteries

  271. Nick Pelling

    Hi Tim,

    Thanks for your very quick response - I patched the file as you suggested, & everything works fine again!

    For future releases, might I suggest a checkbox to insert rel="nofollow" into the outbound category links, and another for inbound category links? This is simply because WordPress SEO tools hack the default category widget, not your clever one.  :-) 
    Thanks again & best regards, ....Nick Pelling.... // http://www.ciphermysteries.com/ (147 categories!)

  272. Tim Trott

    You should have the option on the widget page to set the number of Folding Category Widgets. In 2.7 its at the bottom of the page.

  273. Tim Trott

    Hi Markus,

    I was planning to review the way css classes and ID's are handled and introduce multiple css classes so that the list can be styled a lot more than it currently can.

    The downside of this is that anybody who has already styled the list will need to redo their css code.

  274. Tim Trott

    Hi Ryan,

    Please exclude the Uncategorised section by adding '1' to the exclude list.

    I still have not worked out why WordPress returns an incorrect number of posts in the Uncategorised category, but it is on my list of things to look at.


  275. Tim Trott

    Hi Nick,

    The problem is caused by the instanceof method which is only supported on PHP 5+. To fix the error for PHP 4 please change the line

    if (!($par instanceof WP_Error)) (line #467)


    if (!is_a($par, "WP_Error"))

    . is_a is not supported on PHP 5. I messed up on the compatibility with this function, I'll integrate the changes into the next release, but for now would you be kind enough to accept my apologies and change the file manually?


  276. Nick Pelling

    Hi Tim,

    Love your plugin - but trying to activate the latest release in WP2.7 yields the following message:-

    Parse error: syntax error, unexpected T_STRING in [...]/wp-content/plugins/folding-category-widget/wp23_folding_cats.php on line 467

    Because I had modified your last release to try out some rel="nofollow" pagerank sculpting, I removed the plugin and reinstalled it from scratch - but the error still happens.

    Any ideas? Might there be some kind of subtle PHP issue? I'm running Linux, Apache/2, PHP 4.4.8

    Cheers, ....Nick Pelling....

  277. Tim Trott

    Plugin has now been updated for WP 2.7 support.

  278. Heinz Jürgen Höninger

    I tried to download the folding-category-widget.zip.

    But it is impossible. The result is a white page.

    Thanks for your help!!



  279. Prakash

    Hi there,
    I am using one plugin "Folding Category Widget" located at WordPress Folding Category Widget

    After updating to WordPress v2.7 I am getting following error.

    Catchable fatal error: Object of class WP_Error could not be converted to string in htdocswordpresswp-contentpluginsfolding-category-widgetwp23_folding_cats.php on line 464

    the error only comes on Home Page of blog, when I browse inner pages, the plugin seems to work fine..

    Please someone help me,
    Thank you,

  280. Time Synchronisation

    This plugin is ace

  281. Ryan

    My widget is showing 3 posts for 'Uncategorized' even though there are none in this category.

    I've rebuilt the cache and checked that there are no Uncategorized posts.

  282. Markus


    Absolut great plugin! It workss and its easy to admin. But i suggest 2 thinks. Can you add in one of the next versions to classes: one for the current link and one for the current-parent. So we get a lot of design-features.

    Thanks a lot!

  283. Coloring Pages

    Wow this code is great. You relieved my sufferings! My site will have about 50 categories with 100 of subcategories each and this plugin helped me to sort it easily.

  284. sur

    Hi, Could you help me?
    How can I instance the widgets in the same sidebar?
    When I add the widget the link to add another isn-t

    Thanks in advanced

  285. caratage

    hi tim,

    this is exactly the plugin i was looking for. many thanks, i really appreciate your work.

    cheers, urs

  286. Joe

    thx mate you make my life easier!

  287. Heinrich


    I had exactly the same problem as F98 and his solution worked great. Looking forward to the update to fix this bug because i love the plugin!

  288. F98

    Hi Tim,

    your hint was helpful to find the problem. First I had to deactivate "Automatically rebuild cache" and then click on "Build Cache".

    When I now write some articles no warning occues, but when I reactivate "Automatically rebuild cache" it shows the warning again when I save/edit an article. I think it seems to be a problem with the cache-rebuilding functionality. I'm using Apache 2.2.6 and PHP 5.2.4.

    Regards F98.

  289. Tim Trott

    At what stage are you receiving this message? Have you tried clicking on the build cache button which will force a refresh of the data. It sounds like one of the cache objects has either been corrupted or is sticking to a very old version.

    Please try and rebuild the cache and let me know.

  290. F98

    Hi Tim!

    The unserialize bug is still online! I use WP 2.6.2 and updated to Folding Category List 0.6.1

    Now the following warning messages are occur:

    Warning: unserialize() expects parameter 1 to be string, array given in .wp-contentpluginsfolding-category-widgetwp23_folding_cats.php on line 653

    Warning: unserialize() expects parameter 1 to be string, array given in .wp-contentpluginsfolding-category-widgetwp23_folding_cats.php on line 653

    Warning: Cannot modify header information - headers already sent by (output started at .wp-contentpluginsfolding-category-widgetwp23_folding_cats.php:653) in .wp-includespluggable.php on line 770

    Regards F98.

  291. Tim Trott

    I believe that the unserialise bug is now fixed in the latest version (0.6.1). Let me know if there are any more problems.

  292. Tal

    I'm also having the same problem as MadDog

    Warning: unserialize() expects parameter 1 to be string, array given in /home/MYNAME/public_html/wp-content/plugins/wp23_folding_cats.php on line 640

    Warning: unserialize() expects parameter 1 to be string, array given in /home/MYNAME/public_html/wp-content/plugins/wp23_folding_cats.php on line 640

    Warning: Cannot modify header information - headers already sent by (output started at /home/MYNAME/public_html/wp-content/plugins/wp23_folding_cats.php:640) in /home/MYNAME/public_html/wp-includes/pluggable.php on line 770

  293. F98


    I've got the same problem like MadDog, but the problem appears with WordPress 2.6.1 too.  :( 


  294. Daniez

    thanx for the plugin, and also the CSS tips...

  295. Tim Trott


    There is no JavaScript in this plug-in. It is something I thought about but never implemented.

    Each time a link is clicked the page is posted back to the server.

  296. Jon

    This doesn't seem to work as expected. I thought it would use javascript to expand and collapse to show sub categories of a parent category. It does not seem to do that at all. Do you know of a widget that has this functionality? Something like what Collapsible Archive Widget does but for categories?

  297. Mad Dog

    It's a miracle! The problem seems to have been fixed with WP update 2.6.1

  298. Mad Dog

    Everything&squot;s been great but all of a sudden when I try to add a post I get the following error:

    Warning: unserialize() expects parameter 1 to be string, array given in
    on line 640

    Warning: unserialize() expects parameter 1 to be string, array given in
    on line 640

    Warning: Cannot modify header information - headers already sent by (output
    started at
    in /home2/abletwol/public_html/able2laff/wp-includes/pluggable.php on line

    The post is added, but....what happened? And what do I do about it?


  299. QueenEve

    no updates for wp 2.6 ????

  300. Philix

    This is a great plugin!

  301. F98

    Hi, with WordPress 2.6 the plugin produces the following warning after editing a post:

    Warning: unserialize() expects parameter 1 to be string, array given in .wp-contentpluginsfolding-category-widgetwp23_folding_cats.php on line 640

    Regards, F98.

  302. Tim Trott


    I do not believe that it is possible to call any of the functions outside of WordPress because they require WordPress to be loaded.

  303. Jeroen


    first of all thanx for this great plugin. We are using it at http://amsterdam.spottedbylocals.com

    I&squot;ve only 1 question; is it possible to start the &squot;rebuild cache&squot; function outside of WP?

    Thanks in advance

  304. Nick Ogbourne

    Brilliant. Just can't get the categeroy exclude to work. What is the categroy id? The name?

  305. John

    When i add the widget it makes everything that was previously there disappear in the sidebar, so pages, archives, meta etc dont show, only the categories because of the widget.

    Am i doing something wrong?

  306. inspirasi bisnis

    can I see the screenshot before I Install?


  307. minde66

    Is it possible to sort categories in custom order as in &quot;Category Order&quot; plugin?

  308. Beren

    This is exactly what I needed, thanks so much. Now I have a question... you can produce multiple folding menu&squot;s, but is there a way to not make it global but that you can choose which folding menu goes on which category template. Each category should have it&squot;s specific folding menu and not show the rest...

  309. Elke

    Is there any way to alter the link output to generate post titles rather than the entire post?


  310. Elke

    It'd be so awesome if post titles could be listed under each category in the place of child categories.

  311. Trace

    Great plugin! Any hints on where I would look to make it so that even empty categories show?

  312. baron

    hi there .thanks for plugin:

    Does anybody know if tis script is compatible with WordPress 2.5.1 ?

    Thanks in advance for any help on this!

    best regards

  313. etnakorg

    many thanks sir, great code.
    just a question, I got this:
    *icon* ParentCategoryName
    (Post count)
    *icon* ChildrenCategoryNAme
    (Post count)
    *icon* ChildrenCategoryNAme
    (Post count)

    and so on... How to get, where to put the code to get the posts count beside the cat/subcat name, with this layout:
    *icon1*ParentCat_Name(Post count)
    *icon2* Child_Cat_NAme(pc)
    *icon3* Child_Cat_NAme(pc)
    *icon4* Child_Cat_NAme(pc)
    and so on, is it also possible somehow to set a single icon for each item?
    many thanks in advance Etnakorg

  314. rae

    As previous commenter, in WP 2.5.1 I select &squot;show child categories only&squot; and expect sub-cats to be displayed when a main category is opened. This does not happen, nothing is displayed in this setting. Please help. Thank-you.

  315. Richard

    using wp-2.51 when using the option &squot;show child categories only&squot; this does not display children of a parent category. Any advise please? TIA

  316. malcolm coles

    Hi, I&squot;m trying to get this to work, but I can&squot;t get the child categories to appear, let alone style them. I have &squot;highlight all categories post is in&squot; set to yes, and &squot;enable css to show expandable categories&squot; set to yes. Is there something else I should be doing? Thanks!

  317. Malcolm Coles

    This looks like just the plug-in I want as I want just the child categories of the parent category I&squot;m in to show, if you see what I mean. That is how the paranormal site above is working. But I can&squot;t get the child categories to show - which option is it that does this. Apologies if I&squot;m being stupid! Or maybe do I need to do something to my CSS as well?

  318. anna

    Hi! I&squot;m having the same problem as Shannon with &quot;call to undefined function: buildparental()...&quot;. WP 2.5 and a freshly downloaded plugin. =(

  319. FendyBt2

    How do I put this plugins in my sidebar with a themes that don&squot;t use widgets? any code to trigger that? thanks...  :) 

  320. rpoulin

    Great, but I&squot;m not that familiar with CSS. Here a have my Style.css with the following style regarding the sidebar :

    #aside {float:right; overflow:hidden; width:230px; padding:10px;}

    #aside .title {margin:0; font-size:100%; font-weight:bold;}
    #aside .aside-padding {padding:0 10px 15px 0;}

    and here is the sidebar.php section concerning the categories:


    Where should i add the style for the folding category such as your exemple:

    #folding_category_list li ul li {list-style-type:none;padding:3px 2px;}
    #folding_category_list .lwfcl_level-0,
    #folding_category_list .lwfcl_level-1,
    #folding_category_list .lwfcl_level-2 {background-repeat: no-repeat; background-attachment: scroll; background-position:top left; padding-left: 15px; background-image: url(images/bullet.gif) }

    Thank you.

  321. jan

    here ist the multilanguage-plugin i try to work with: http://www.qianqin.de/qtranslate/

  322. Jerry

    The category for the post being viewed isn&squot;t highlighting. Miscellaneous category names are highlighted however. Is this a bug that you&squot;re aware of or user error  :)  ?

  323. Jerry

    can you nix that last request. I embarrassingly was using the wrong plug-in ... doh. Thanks - great plugin!

  324. Tim Trott

    Jan, I'm not familiar with that plugin, could you please direct me to its homepage so I can investigate.


  325. Stojtscho

    Sorry for my English (I am from BG):
    Where to put the code from the CSS Examples? Thanks in advnce!

  326. jan

    hi, a wonderfull plugin!
    But i think it doesn't work with multi-language-plugins like "qtranslate" or "polyglot".

    The category list shows the titles and translations at the same time like this:
    "[lang_en]Projects[/lang_en]"[lang_de]Projekte[/lang_de]"... any hints?

    thanks! jan

  327. Shannon

    Thanks so much for the quick fix!

  328. Tim Trott

    Shannon, This problem has been resolved. Since you didn't provide any contact details I can't email you the fix, but you can re-download the plugin to solve the problem.

  329. Shannon

    I love this plugin and it was working fine until I upgraded to version 0.5.0 + WP 2.5. Now in the Widgets page I get this error:

    Fatal error: Call to undefined function buildparental() in [...]/wp-content/plugins/wp23_folding_cats.php on line 781

    Any ideas? Thanks!

  330. Josep M

    I&squot;m just testing your WP Folding Categories widget. Apparently you can&squot;t select for a blog a category and its subcategory? (say my post belongs to Music and of course to Arts, but somewhere I want to display all the Art related posts, and somewhere else only the Music related posts).

  331. ctraos

    okk, muchas gracias !!

  332. Kent

    I love this plugin very much, bit would like to have multiple instances, 2 or 3 anyway. In the situation of the Dutch site mentioned I want to seperate &quot;Coolstuff nl&quot; categories fromthe rest.

  333. Yi

    I have a problem with using the widget. Everything is fine, except that when I few single posts, the bolded child category and expanded parent category is the wrong one. In fact it always seem to show the same category (the first category) for all the posts when you view single posts. You can see an example of this on my blog.
    Everything else works splendidly though and I really appreciate this plugin. So thanks.
    Can you email me about a fix or an explanation?
    Thank you.

  334. Nathan

    I&squot;m wondering if you category plug-in can display only the sub-categories once a category is selected off the main page.

    For example:


    I click Fruit..

    Now the categories are only:


    All the other ones are hidden.

    Is this possible?


  335. .45

    I was wanting to use desc. in the tree since I&squot;ve optimized category names for SE. Possible feature request.

  336. .45

    A perfect solution without requiring JS. I especially like the highlighting of posted cats. Only thing I can't seem to make work is "Category Description as title".

    A nice option for me would also to embed a homepage link to easily navigate back.

  337. mikh

    Great plugin! Thank you very much!

    Could you explain where within DB menu tree is stored when &quot;Use cache for building menu tree&quot; checked? What should be done in case I decide to deactivate plugin? Should I clear DB manually or not?

    (I like plugin very much but now I make site for other people, so they need to know their database will not be affected in some way after possible deactivation any of using plugins)

    Thank you, again


  338. mikh

    In "download" box you should change date (now it is 2007 year)

  339. banji

    I am trying out your category plugins, and I would like to have them on my blog and function like yours in this blog.

    However, I can't seem to be able to make it work.

    If you'd be so kind and reply this via email. Thanx for your attention

  340. main

    i have problems with the symbol &

    great plugin!

  341. Queeneve

    great great great plugin , that is exactly what i needed

  342. Tim Trott

    Ian, I have added this as a feature to the next version.

  343. Nathan


    Im interested in your Folding Category Widget.. but am wondering if there is a way to only display the sub-categories based on the main category being viewed.

    For example, the blog home (root) would only display the top level categories.

    Once a top level category is clicked, the only categories displayed are the sub-categories related to the top level category that was clicked.

    Same with single posts -- incorporating the idea of prioritizing the higher category ID.

    Is this possible with your module?


  344. Ianr

    Is there an easy way to expand ALL categories that a post is in? I wan't people to see how others have categorized something.

  345. John

    Great widget. You can see it working on my weblog. Its in Dutch but...Thanks

  346. Tim Trott

    Neil, this is a problem with PHP 4 not supporting XML. I have re-written to include support. Please download the latest version and try again.

  347. Neil

    Thank you for you cool folding categories plugin for WP. I have installed it in my website however I get the following error

    Warning: domdocument() expects parameter 2 to be long, string given in /wp-content/plugins/wp23_folding_cats.php on line 105

    Fatal error: Call to undefined method: domdocument->loadxml() in /wp-content/plugins/wp23_folding_cats.php on line 107

    You mentioned on the WP website that if someone received this error you would like to know.

  348. Thorsten Kaluza


    this is some nice pluging.

    I installed it on my site but its showing a mysql error.

    WordPress database error: [Table dldpromo_wordpressdb.wp_term_taxonomy doesnt exist]
    SELECT * FROM `wp_term_taxonomy` JOIN `wp_terms` ON wp_terms.term_id = wp_term_taxonomy.term_id WHERE wp_term_taxonomy.taxonomy = category ORDER BY wp_terms.name ASC

    Do you know how i can resolve this?

    Any help is appreciated.  :-) 

    Thanks in advance and god bless.


  349. Klaus

    Nice work. Would be even nicer if thered be the otion to add individual classes to each category. Is there a chance?


Leave a Reply

Your email address will not be published. Required fields are marked *

Article by Tim Trott, printed from http://timtrott.co.uk/wordpress-folding-category-list/ on 2015-10-02, all rights reserved.