Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Woocommerce Categories Order

I am trying to re-order my categories from the default alphabetical order.

My admin backend my categories look like this:

enter image description here

And on the frontend they they look like this:

enter image description here

Is it possible to have them displayed in the way I have sorted them in the backend?

like image 743
Christodoulou Andreas Avatar asked Apr 25 '16 08:04

Christodoulou Andreas


People also ask

Can a product have multiple categories in WooCommerce?

There is a woocommerce shop, categories on the left side (sidebar) and on the right side products. A product can have multiple categories; for example, the product "Burger" is in the categories "Food" and "Fastfood".

How do I customize the default product sort order on the category page in WooCommerce?

Go to Appearance > Customize in your WordPress admin. Once the Customizer opens, go to WooCommerce > Product Catalogue. This is where you will find your options for sorting products. Ensure that Default Product Sorting is set to “Default sorting (custom ordering + name)”.


2 Answers

add this to your args list

$args = array(
       
          'orderby'=>"menu_order",
  );

Within the array used for the loop's arguments uses native Wordpress functionality to accomplish the OP's goals... rather than installing yet another plugin where it's not needed. "Thank you :@aronmoshe_m"

like image 126
Ayoub Bousetta Avatar answered Sep 20 '22 08:09

Ayoub Bousetta


The Category Order and Taxonomy Terms Order plugin will allow you to do this. It'll add a drag-and-drop sortable interface to the backend where the changes you make will take effect both on the backend and the frontend.

like image 34
Tim Malone Avatar answered Sep 20 '22 08:09

Tim Malone