• Hello

    I’ve just upgraded a site i’m working on from 2.0 to 2.1. I use a number of categories and sub categories and sub sub categories, and have noticed that 2.1 behaves differently from 2.0 in relation to these.

    I was using the list_cats function in 2.0 like this

    <?php list_cats(TRUE, '', 'name', '', '', TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, 82, '0', FALSE, '', '', '', TRUE); ?>

    Which showed only children of category 82, and not any children of the child categories. Since upgrading however all child – child categories are also showing.

    Anyone know a way to get around this?? I’ve tried the wp_list_categories function for 2.1 but it doesn’t look like it will help.

    Cheers
    Matt

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Use wp_list_categories and add the categories you don’t want to see to the exclude option.

    Thread Starter the_fear66

    (@the_fear66)

    That could work… but I use WP as a CMS and want my clients to be able to add categories at the lowest level from time to time. Therefore I was hoping to have it done dynamically, as it did in 2.0.

    It would seem a shame for a nice feature like this to disappear in a new ‘improved’ version.

    Cheers
    Matt

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Unfortunately, the changes to the way categories work have eliminated this feature for the time being. Perhaps it’ll be in an update or somebody will come up with a fix. Stay tuned, and be patient.

    i think i got something to work
    download and install this plugin
    http://braydon.com/unfold_list_categories.zip

    to only show 1 level of categories use this:
    <?php unfold_list_categories(‘depth=1&hierarchical=1’); ?>

    in place of this:
    <?php wp_list_categories(); ?>

    let me know if it works for you… it worked for me but it was sort of by accident i think

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_list_categories shows children of children’ is closed to new replies.