This code sets the order on a woocommerce product category archive so products from the parent category display first followed by products from child categories.
By default, any products added to child categories can display in any order on the parent category archive like this :
The code in this tutorial orders products so products from the parent category display first followed by products from any child category of the parent like this :
Copy and paste the following code to the end of your child themes functions file or custom code snippets plugin.
Was This Tutorial Helpful?