How to you put categories in the order you want to? (4 posts)

  1. theebc
    Posted 6 years ago #

    Hi, I'm new at blogging. The categories I used are in an alphabetical listing, of which I do not want. I want them to be in the order I want, similar to my web page. Can anybody explain to me how to do this in simple English language?

    Thank you

  2. tomontoast
    Posted 6 years ago #

    Could you post a link to your website? And explain in which order you do want them. Basically you need to edit wp_list_categories() This has three options: order alphabetically, by the category id or by the number of posts in that category. If none of those options is what you want you will need to write a custom function.

  3. MichaelH
    Posted 6 years ago #

    If those 'orderby' parameters of the template tag, wp_list_categories(), don't work for you, try these plugins:

    tag: order-categories

    tag: my-category-order

  4. Positivx
    Posted 5 years ago #

    Here is what I've done to organize my categories in my subnav bar:

    In header.php find this or something similar to it:

    <?php wp_list_categories('orderby=name&title_li=&depth=4'); ?>

    Now replace "name" with "slug"

    Now when you create your categories you use numbers to create the slugs for them. For instance, on my page ( you can see on http://sdhumanist.org ) my slug for News is 1news. Slug for events is 2events and so on.

    Hope that helped!

Topic Closed

This topic has been closed to new replies.

About this Topic