How to reorder list_catagories() (2 posts)

  1. airbrushtour
    Posted 7 years ago #

    How do I create a custom order for list-categories? orderby doesn't work at all. It still outputs according to id number. What if I want to output like this:

    <?php wp_list_categories('orderby=7,1,4,5,6,9,33&include=7,1,4,5,6,9,33&exclude=10&title_li=' . __('The Category List')); ?>

    As it is, it outputs as: 1,4,5,6,7,9,33, but I want it to output like this:

    7,1,4,5,6,9,33 - NOT 10

    Any suggestions?

  2. stvwlf
    Posted 7 years ago #


    your orderby parameter is invalid syntax
    see http://codex.wordpress.org/Template_Tags/wp_list_categories

    install this plugin which lets you create a custom order for categories - read the instructions first.

    You can leave the include and exclude in your parameters

Topic Closed

This topic has been closed to new replies.

About this Topic