[resolved] Ordering Pages + Categories - How? (6 posts)

  1. vavroom
    Posted 9 years ago #

    I've searched the forum, the plugins, and the site at large, I can't seem to find an answer to this. I hope you'll have wisdom and methods to set me straight :)

    Instead of having a list with pages' link and then categories' links, I am calling the categories directly after the pages. This works fine, except for the ability to order the items on that list in the way I want.

    Pages allow you to specify ordering, but categories only allow alphabetical or chronological order.

    What I'm after is a way to manually select the order of the items in the list created with the following code:


      <?php wp_list_pages('title_li='); ?>
      <?php wp_list_cats(); ?>


    Thanks for any and all information and ideas on this.

  2. vavroom
    Posted 9 years ago #


    Anyone? Please?

  3. Chris_K
    Posted 9 years ago #

    There are a few options for calling category links.

    wp_list_cats() seems to have a lot of optional arguments.

    list_cats() has a lot of fun and different options, might give it a look?

    When you say you want to "manually set the order" what exactly does that mean? Worst case, you could just hand code a link to each... (something like http://domain/blog/category/catname if you don't have tons of cats)

  4. vavroom
    Posted 9 years ago #

    Thanks for the response Solo,

    I've seen those tags, but the only sort order available is either by ID or alphabetical.

    Pages allow you to assign a place in the ordering, so you can sort by id, alphabetical, or you can manually override it to have the pages listed in the order you want.

    Categories don't allow that manual sort (unless there's a plugin somewhere I couldn't find).

    What I'd like to be able to do is to set the ordering for the categories like I do for the pages, and then mix both the list in a single list.

    Yes, I might have to end up building my list manually, but it defeats the purpose of being able to drive the content dynamically when you hard code the links.

    I guess I wish there was a better menu system. Hmmm, perhaps I should hunt for a menu plugin... That's a thought! :)

  5. vavroom
    Posted 9 years ago #

    Solo, thanks for your comments, they made me think in another direction, which sent me looking for a "menu manager" plugin.

    I found http://tela-web.com/wordpress-plugins/sticky-menu/

    Installed it (2 minutes flat) and it looks like it'll do the trick!


  6. Chris_K
    Posted 9 years ago #

    Good deal, glad you got it sorted out in spite of me ;-)

    Interesting little plugin you found there too.

Topic Closed

This topic has been closed to new replies.

About this Topic