Answer the question
In order to leave comments, you need to log in
How to display category products in a specific woocommerce template?
In general, there are 5 categories of products (Metal tiles, corrugated board, etc.). Actually, the 5th category is "Other materials for roofing". It has several subcategories, but it doesn't matter.
What is the point, when we select a certain category of goods, for example "Metal tile", we display goods from this category, and under these goods, a block should be displayed where there will be goods from the aforementioned category "Other roofing materials". How to implement it correctly?
If possible, explain in more detail, because I haven’t figured out WooCommerce yet, but the project already needs to be done, and I only know the basics from PHP...
Answer the question
In order to leave comments, you need to log in
a regular query through WP_Query with these parameters
$array = array('post_type' = > 'product',
'tax_query' = array(
array(
'taxonomy' => 'product_cat',
'field' = > 'term_id/slug/name ',
'terms' = 'id/slug/name'
)
)
);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question