E
E
Emmet12019-01-11 14:59:50
WordPress
Emmet1, 2019-01-11 14:59:50

How to make a page with brands on woocommerce?

Task: to create a page with brands. The page itself should be divided into categories that are already on the site.
Let's say we go to the "Nokia" page, and we have all Nokia products from the site, sorted by category:
smartphones:
(list of Nokia smartphones)...
headphones:
(list of Nokia headphones)...
I found the woocommerce brands plugin, but to unfortunately it only creates a page with brands. there is no way to categorize everything.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2019-01-11
@Emmet1

Hello!
I won't say if there are plugins ready for this... But you can do it without plugins.
1) create a custom taxonomy for brands.
2) add your brands there (Nokia, Siemens, etc.)
3) sort all your products by this taxonomy (by brands)
4) create a template for displaying products of a specific brand. In the template, get products according to the selected brand and output the products in a loop sorting them by the taxonomy of the wokomer itself (where you differentiate products by type. For example, smartphones, headphones, etc.). Those. Basically in the brand taxonomy archive template you need a loop within a loop, the first loop will get the product terms (headphones, smartphones) and the second one will output the products to the corresponding terms.
Useful links:
create taxonomy - https://wp-kama.ru/function/register_taxonomy

register_taxonomy('taxonomy', array('product'), array( ...
specify product in array('') so that the taxonomy is applied to products
cycle in cycle -
https://gist.github.com/azerphoenix/a8c82ffdee27e1...
Template hierarchy to create the desired template:
https://developer.wordpress. org/themes/basics/temp...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question