Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Category ordering in widget (http://forum.bytesforall.com/showthread.php?t=410)

pminner Feb 16, 2009 04:24 PM

Category ordering in widget
 
Hi Flynn!

I really like what you've done in creating Atahualpa. It produces a very clean, professional site and I've donated to show my support for your efforts.

I've been able to figure out how to do everything I need to so far to get the customization desired with the exception of ordering the titles of the categorys/subcategories in the category widget. The categorys/subcategories are always ordered alphabetically, regardless of the order I create them in. I can rename them with a number first, but this is asthetically unpleasing.

An example for displaying the menu for meeting minutes:

Current
Minutes
--April
--February
--January
--March

Desired
Minutes
--January
--February
--March
--April

Do you have any recommendations for ordering the category(s)/subcategories using the category widget or is there a different approach you could recommend?

Thank you!

Paul

Flynn Feb 16, 2009 08:44 PM

You could add this either manually into the top or bottom of a sidebar, but then you'd have to repeat that with each Atahualpa update, so I'd recommend to add the following code by using the http://wordpress.org/extend/plugins/php-code-widget/ PHP widget. Install it and put it into a sidebar and put this into the PHP code widget:
PHP Code:

<?php wp_list_categories('title_li='); ?>

To configure the output see http://codex.wordpress.org/Template_...ist_categories

For instance
PHP Code:

<?php wp_list_categories('title_li=&orderby=name&order=ASC&show_count=1'); ?>

The orderby=name and order=ASC is what you want and it should be the default, so the first example should work for you, but if it doesn't use the second example which explicitly sets those parameters.

Thank you for the donation and let me know if this doesn't work or you wanted something different


paulae Mar 15, 2009 07:37 AM

I was having the same problem. I found this nifty plugin which lets you simply drag and drop your categories in any order you like, when in the category mode.

http://wpguy.com/plugins/category-order/


All times are GMT -6. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.