WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] change category order (9 posts)

  1. crysacraig
    Member
    Posted 7 years ago #

    Could someone direct me to the best plugin to manage categories (if there is one) Or is there some other way to get them so there not alphabetical. Thanks

  2. Doodlebee
    Member
    Posted 7 years ago #

    How about the codex?

  3. crysacraig
    Member
    Posted 7 years ago #

    Oh god! That looks like a challenge. I'll go over it and see if I can understand it. Thanks

  4. crysacraig
    Member
    Posted 7 years ago #

    Are there any other options besides codex?? It will take me all summer to figure out that codex. LOL!

  5. moshu
    Member
    Posted 7 years ago #

    For what you want you don't need the whole codex, just the page you were pointed to.
    In the Parameters section it says clearly:
    order_by - ID or name (this one is the alphabetical).

  6. crysacraig
    Member
    Posted 7 years ago #

    Say I want to use this code below.

    <ul>
    <?php
    wp_list_categories('include=5,9,23&title_li=<h2>' . __('Table of Contents') . '</h2>' ); ?>
    </ul>

    The 5,9,23 represent category id's right? So If I want all them displayed I have to add every category id to that list, in the order I want the categories to appear. Am I understanding that right??

  7. moshu
    Member
    Posted 7 years ago #

    Are we reading two different texts? By default, the template tag should display ALL your categories. If you want to show ONLY certain categories - you will use either include or exclude. And then add the orderbby parameter - see the examples given there.

  8. kvandaele
    Member
    Posted 7 years ago #

    if i understand him right, he's asking for a way to order them to his preference (as in neither by ID nor alphabetized).

    Say he adds Oranges, Apples, Pineapple and Peaches. He wants them ordered as Peaches, Oranges, Apples, and Pineapple for some reason. order by ID would be the order in which he added them, and alphabetical would be Apples, Oranges, Peaches, Pineapple; neither of those are what he wants.

    I haven't read the entire codex, but I have read that page and nothing in there (unless I missed something) suggests this is built into the WP core. Your best luck is programming one yourself, or trying to find a plugin that does this.

    Oh, a quick google search turned up this. Google, you should try it sometime ;)

  9. crysacraig
    Member
    Posted 7 years ago #

    @kvandaele.. Thank-you very much! It works great.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.