Not quite sure why this has happened, but looks like WordPress has decided to store the categories in a particular order (possibly alphabetical, but in English?)
You could manually change the order in your SQL database, but if you don’t mind installing a plugin the easiest solution would be Post Types Order plugin. This will add a nice drag and drop reorder function to all your custom post types including the WP Catalogue. So with this you can set the order however you like.
Hey Maeve!
That’s odd, isn’t it?
I have deleted everything and started from scratch.
Debugging now, seems that the plugin displays the categories in the order they are added, and doesn’t take into consideration that it has a parent or not.
If I add “Category1” first, then “Category2” as subcategory, it will display:
Category2
Category1
You understand?
Have something in mind I can try here, regarding the code?
// generating sidebar
if($count>0){
$return_string .= '<li class="wpc-category ' . $class . '"><a href="'. get_option('catalogue_page_url') .'">Todos os Produtos</a></li>';
foreach($termsCatSort as $term){
//sub category class
if($term->parent > 0){
$class2 = ' sub-cat';
}else{
$class2 = ' main-cat';
}
if($term_slug==$term->slug){
$class = 'active-wpc-cat';
}else{
$class = '';
}
$return_string .= '<li class="wpc-category '. $class .''. $class2 .'"><a href="'.get_term_link($term->slug, 'categoria').'">'. $term->name .'</a></li>';
}
}else{
$return_string .= '<li class="wpc-category"><a href="#">Nenhuma Categoria</a></li>';
}
Ok yep that explains it. Actually that is exactly how it is meant to work – it lists in reverse order from what you uploaded, same as normal WP posts.