• I’ve upgraded to 2.1, and I changed my list_cat code to wp_list_categories() but it doesn’t display as I expected.

    My blog is https://www.freesitebuilder.co.uk/WordPress/ – this is using list_cats and is how I want the Categories list to look.

    Using wp_list_categories() I get this:
    [URL=https://img104.imageshack.us/my.php?image=sidebarlj6.jpg][IMG]https://img104.imageshack.us/img104/1520/sidebarlj6.th.jpg[/IMG][/URL]
    (I hope posting a link to the screenshot is OK)

    I thought using the defaults would give me exactly the same as my original, but as you can see it doesn’t.

    I’m obviously doing something wrong, but I can’t work out what – the codex seems perfectly clear, but I still don’t get it right.

    TIA

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pramclub

    (@pramclub)

    I’ve tried to make this work, and also tried a couple of plugins, but I either get a broken categories list (as in the screenshot) or a completely blank page.

    My current code:
    <?php wp_list_pages(); ?>
    <li><?php _e('Categories'); ?>
    <ul><?php list_cats(FALSE, ' ', 'name') ?>
    </ul>
    </li>

    I’ve tried replacing list_cats before, on 2.0.7, using wp_list_cats, but that produced the same problem. So could it be my template?

    I’ve got wordpress 2.2.1

    wp_list_categories is crap when it comes to use it in the sidebar.

    Don’t change it in yout sidebar.php, won’t work. Get the following:

    Executable PHP widget at https://ottodestruct.com/

    and write the tag code into the widget, something like:

    <?php
    wp_list_categories(‘title_li=&hide_empty=0&hierarchical=1&orderby=ID&show_count=0&exclude=50,565’); ?>

    -> You get no title, empty are displayed, hierarchical order as parents and children and now exclude works fine.

    Have taken me hours.

    Works for me in the left sidebar (top):
    https://wonderland.creative-assets.com/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_list_categories() doesn’t display as expected’ is closed to new replies.