Results 1 to 7 of 7

Thread: Nav Bar Category Order?

  1. #1
    Thread Starter
    cometa's Avatar
    Join Date
    Apr 2009
    Location
    United States
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Nav Bar Category Order?

    How would I change the order of the Category Links in the Nav Bar?

    Downloaded a plugin to reorder the categories but it does not change the order in the Nav Bar.

    Thanks for your help.

  2. #2
    Veteran sonnycool's Avatar
    Join Date
    Mar 2009
    Location
    Malaysia
    Posts
    308
    Thanks
    32
    Thanked 2 Times in 2 Posts

    Re: Nav Bar Category Order?

    some thing like my site with top nav bar ?
    http://www.motortrader.asia
    the plugin name i use : PixoPoint Multi-level Navigation Plugin

  3. #3
    Founder dcowgill's Avatar
    Join Date
    Mar 2009
    Location
    San Francisco, CA
    Posts
    1,939
    Thanks
    66
    Thanked 135 Times in 99 Posts

    Re: Nav Bar Category Order?

    How would you like to order the categories?

    wp_list_categories is the function that does this. You'll need to edit the index.php page and search for the following:

    Code:
    <?php wp_list_categories('show_count=0&title_li=&depth=1'); ?>
    Then depending on how you want to order the categories, you can add the "orderby=" parameter so it will look like this:

    Code:
    <?php wp_list_categories('show_count=0&title_li=&depth=1&orderby=id'); ?>
    That will now show the categories ordered by ID.

    Your options of ordering the categories are by: ID, name (default), count, slug.

    See this WordPress page for more information on this function.

  4. #4
    jschodde's Avatar
    Join Date
    Apr 2009
    Location
    Anthem, AZ
    Posts
    154
    Thanks
    3
    Thanked 1 Time in 1 Post

    Re: Nav Bar Category Order?

    I was able to get my categories in the order I wanted by using the "My Category Order" plugin:
    http://wordpress.org/extend/plugins/my-category-order/

    The trick to getting the sort order to work was to change "orderby" parameter (index.php) from "name" to "term_order":
    Code:
    wp_list_categories('show_count=0&hide_empty=0&orderby=term_order&order=asc&title_li=')
    Cheers!

  5. #5
    Newbie
    Not a Verified Customer
    jenwild's Avatar
    Join Date
    Jul 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Nav Bar Category Order?

    Here's the combo that worked best for me in the classipress index.php:

    Code:
    <?php wp_list_categories('show_count=0&hide_empty=0&title_li&orderby=ID'); ?>

  6. #6
    Junior Member kk8ete's Avatar
    Join Date
    Feb 2010
    Posts
    47
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Nav Bar Category Order?

    Hi there,

    With this topic i have found a good help ! thanks

    But i have a question concerning category order.
    In fact, i would like to change the catagory order - by ID when user want to post an article.

    Do you know what is the good code to implement in post.php ?

    Thanks a lot !

    (sorry for my bad english)

  7. #7
    Junior Member kk8ete's Avatar
    Join Date
    Feb 2010
    Posts
    47
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Nav Bar Category Order?

    up ? anyone can help me please ?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)