• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2762

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Premium Access
  • Log in

WooCommerce Product Categories Widget – Change The Order Of Categories

This free code enables you to change the order of your categories displayed using the WooCommerce Product Categories widget.

On your WooCommerce > Products > Categories admin page, you can change the order of categories on the front-end using drag and drop to sort them.

add_filter( 'woocommerce_product_categories_widget_args'

Using the following code in your child themes functions file, you can change the default order.

Download Code – Free

Tested using the Genesis Sample child theme by StudioPress with the Genesis WooCommerce Connect plugin.

You can learn more about this hook in wp-content > plugins > woocommerce > includes > widgets > class-wc-widget-product-categories.php

The hook used in this function enables you to filter the wp_list_categories arguments used to display your product categories in the WooCommerce Product Categories widget.

You could also use the wp_list_categories hook ( Untested ) like this :


add_filter('wp_list_categories','modify_wooc_product_categories_order');

function modify_wooc_product_categories_order($output) {

// Add your modified arguments here

   return $output;
}

Taxonomy Terms WooCommerce

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
 

Loading Comments...
 

You must be logged in to post a comment.