WordPress.org

Ready to get started?Download WordPress

Forums

Categories in alphabetical order: its not working properly!!! (9 posts)

  1. alexb_rj
    Member
    Posted 8 years ago #

    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!

  2. Gillie2tat
    Member
    Posted 8 years ago #

    Open sidebar.php, and try using this:-

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

    it worked for me.

  3. alexb_rj
    Member
    Posted 8 years ago #

    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"!??

  4. josalmon
    Member
    Posted 8 years ago #

    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.

  5. Gillie2tat
    Member
    Posted 8 years ago #

    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?

  6. alexb_rj
    Member
    Posted 8 years ago #

    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!

  7. Gillie2tat
    Member
    Posted 8 years ago #

    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.

  8. Gillie2tat
    Member
    Posted 8 years ago #

    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.

  9. alexb_rj
    Member
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.