Site logo

Archived topic

Category Woocommerce

10 replies · Started by Forum User on May 21, 2021

Viewing posts 1–11 of 11

Hello,
Ik got on mine site woocommerce sub category.
But the sub category are in de main category.
i got the category ''bab'y'' and there under i want ''jongen'' ''meisje''
but the sub are standing in the main catory also

http://www.marktstore.nl/index.php/product-categorie/baby/

Thank you.
No. above is the sub category as well '' Meisje '' & '' Jongen '' has to get out of there.
under category baby it is fine

Just to confirm do you want to only show Parent Categories in the menu ? And does this apply to other pages like the Shop Page?

Go to Dashboard > Appearance > Elements.
Edit the element titled: Woocommerce Shop Category Menu
Look for this part of the code:

<?php
$cat_args = array(
	'orderby'    => 'name',
	'order'      => 'asc',
	'hide_empty' => true,
);

And change it to:

<?php
$cat_args = array(
	'orderby'    => 'name',
	'order'      => 'asc',
	'hide_empty' => true,
	'parent' => 0,
);

The change is just adding the 'parent' => 0, argument

Yes!!!!1!! THANK YOU!!!!!!!!!
you are a Hero.

one more little question. How can you change the order of category?
https://www.screencast.com/t/oQF20InYUE
I have here to drag it up and down.
but that didn't work

In the code above change:

'orderby' => 'name',

to:

'orderby' => 'menu_order',

It should use the Order you have set in the category list

Thanks again!!!!

Glad to be of help

This archived topic is closed to new replies.