• My categories do not display alphabetically. I’ve noticed in other threads here that some users categories DO display alphbetically. I don’t understand why it’s one way for some & another way for others.

    In another thread, someone suggested this as a solution to the problem of getting categories to appear alphabetically in a sidebar: Here is the function call that I use…
    <?php list_cats(0,”,’name’,”,”,true,0,1,1,1); ?>

    Can someone tell me whether this will do for me what I need? And also, into which template do I insert it & where within the template? Or is it inserted via control panel? Is there an easier way to do this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try this: http://wordpress.org/support/topic/22801 for sorting categories within your post, but for the template tags:

    For wp_list_cats()

    <ul>
    <?php wp_list_cats('sort_column=name'); ?>
    </ul>

    For list_cats()

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

    I think you are using the old 1.2 version usage of the template tag.

    What version of WordPress are you running? I ask because there was a bug in list_cats with 1.5 that was resolved in later versions.

    Thread Starter richards1052

    (@richards1052)

    Kafkaesqui: I believe I’m running 1.5.1.

    Lorelle, sorry for the confusion I introduced my not being clear about what I wanted. I want my categories to display alphabetically in my sidebar. I don’t want to sort POSTS alphabetically within categories.

    And on a diff. subject, Lorelle (since you’re an expert on displaying images in WP), I’m having a helluva problem getting links to display images. All my sidebar links containing amazon jpgs display fine. But any images located on my host server & other externally linked images in my sidebar links do not display (3 in all). All the images within my posts are displaying fine.

    Here’s my blog: http://box22.bluehost.com/~richard2/tikun_olam/

    I had started using 1.5 and found my categories didn’t alphabetize. I was advised that 1.5.1 fixed that, and apparently it did. Download 1.5.1 and I assume it will help you.

    Sorting alphabetically and hiding empty categories at the same time is not pheasable.
    <?php list_cats(0,'','name','','',true,0,1,1,1); ?>
    turns into
    <?php list_cats(0,'','name','','',true,0,1,0,1); ?>

    JC

    Thread Starter richards1052

    (@richards1052)

    David: Don’t think you read my msg. I DO have 1.5.1 running. And categories don’t alphabetize.

    Jcraveiro: I don’t have any empty categories & never will. So I’m not worried about hiding them. So is there a way I can use code to display categories alphabetically?

    I got the same issue also. I am using 2.0 upgraded from 1.5 and Beckary theme.

    This code worked like a charm: <?php wp_list_cats(‘sort_column=name’); ?>

    Thanks Lorelle!

    🙂
    Kim

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘categories do not alphabetize’ is closed to new replies.