• Try to get the categories listed like this:

    <?php
    $categories = wp_list_categories('orderby=name&show_count=0&title_li=&hide_empty=0&echo=0');
    foreach ($categories as $cat) {
    echo '<li><a href="'.$cat->category_nicename.'" title="'.$cat->cat_name.'">'.$cat->cat_name.'</a></li>';
    }
    ?>

    Why this is not working? Is there an other option to display the categories in the sidebar.php completly the way I like? I like to define the complete HTMl-code for the listing.

    Any ideas?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dumb question – are there posts existing in the categories now? And, could you post a link by chance?

    Thread Starter swxc

    (@swxc)

    Hi pastorcox

    I’ve WP installed local.

    I would like to show all the categories in the sidebar, not only the categories where the post is stored in. I like to get the same result as the following code, only more flexible:

    wp_list_categories('orderby=name&show_count=0&title_li=&hide_empty=0&echo=1')

    (Sorry for my bad english)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘flexible category listing’ is closed to new replies.