WP WOOCOMMERCE Category Output
How can I display a product category for example on the main page, I thought to use the rpwe plugin, but it displays posts... I would like to display categories as the top categories in the store, please help
0
Author: Азат Сабыров, 2020-06-10
1 answers
The product category is the" user taxonomy " product_cat used by WooCommerce products.
You need to use get_terms() with the correct taxonomy, like this:
$categories = get_terms( ['taxonomy' => 'product_cat'] );
Well, you can also display it in index.php either in the page template or wherever you want. I hope I understood the question correctly.
0
Author: dmitriy_vlz, 2020-06-10 09:47:05