WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Wordpress 3.1, with the WP E-commerce plugin (3.8.2) with Gold Cart 2.9.1. I posted this question a while back on the getshopped.org forum, with no solution unfortunately...

I have a list of product categories on my store products page (not the category widget), and I would like to change the order to sort the categories by their ID, not their names. At the moment, they are sorted alphabetically.

I found a possible solution here


I have tried all these fixes to no avail, particularly the "order_by" fix by leewillis77 about a year ago. I have just realised the structure of the database of version 3.8 has completely changed too, so I expect this is the reason this fix isn't working.

Ideally, I would like a fix that doesn't edit any core files so when the next update comes along nothing changes.

I can't share my site as it's local at the mo

Hope someone can help! Many thanks Paul

PS My PHP skills are pretty limited, as is my experience with MYSQL so dumbdown solutions a bit please ;-)

share|improve this question
Make sure you're not using the Post Types Order plugin, as it will override any 'order by' statements you're using. – SickHippie Mar 30 '12 at 23:08

I've prepared a plugin for WPEC which enables you to use Category Order and Taxonomy Terms Order plugin on variations items.

So, changing variations items order is as easy as drag and drop.

You can download it at: http://david.binda.cz/products-page/plugins/custom-variation-order-for-wordpress-e-commerce

share|improve this answer

use wp_list_categories:

$args = array('taxonomy' => 'wpsc_product_category', 'orderby' => 'ID', 'order' => 'ASC');
wp_list_categories( $args );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.