WordPress.org

Support

Support » How-To and Troubleshooting » Categories in alphabetical order: its not working properly!!!

Categories in alphabetical order: its not working properly!!!

  • Please, someone help me in this issue:

    I’m trying to put my categories to appear in alphabetical order, but, after search in this forum about this and do what others said to, it is not working properly yet!

    In sidebar.php I got this: <?php wp_list_cats(‘sort_column=name&optioncount=1’) ?>

    But, though the code is “sort by name”, I noticed that the categories are ordered according to the ID assigned to them. What can I do to solve this problem???? Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Open sidebar.php, and try using this:-

    <?php wp_list_cats(‘sort_column=name& hide_empty=0’); ?>

    it worked for me.

    Thank you, I did like this and it works properly, in alpha order, but, then, the “uncategorized” has appeared!!!

    Is there a way to get rid of this “uncategorized”!??

    I use this:

    <?php wp_list_cats('sort_column=name&optioncount=1'); ?>

    In my experience, categories only display if they have anything in them – if uncategorisez is empty, it won’t show up.

    You could try deleting the “uncategorized” item in your list of categories through the admin pages. If it’s not that maybe you have an extra line of coding in there which is causing it to appear?

    Yes, but my uncategorized is appearing but I don’t have post in this… and – I don’t know how – only my three pages (not posts) are under “uncategorized”.

    In fact, when I wrote that pages, I couldn’t (and I can’t) select a category…

    I don’t know why I can’t get my categories in alpha order!

    Well the “uncategorized” item would only be showing up if there were an extra line of code or an item called “uncategorized” in your categories. You should just be able to delete it from your categories by going into the admin page. Since it has no items filed in it deleting it won’t cause any listing problems.

    I have just been to your blog using the link in your name, looks like you’ve fixed it? I’m using Firefox and could see what you were talking about a few minutes ago. The categories are now displaying in alphabetical order and there is no “uncategorized” item there. There was an “uncategorized” item the first time I visited.

    You saw it because I was testing the code… this uncategorized item comes from that 3 pages I explained before.
    If I put hide_empty=1, so that uncat./ appears! Even without a post!

    When I tried to delete it, WP shows me this message: “Can’t delete the Uncategorized category: this is the default one” But my default one is anoter category, called “Pessoal”.

    It may be a problem on my WP, or the code, I suppose.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Categories in alphabetical order: its not working properly!!!’ is closed to new replies.
Skip to toolbar