Brand Select is both a Gutenberg block and a shortcode that adds a select dropdown with all your brands, so your users can select the brand and see the products in it.
Following you find the options of Gutenberg block.
- Title: you can enter a custom title before this block
- Paginate items: choose whether to paginate the items or not
- Items per page: if you paginate items, you can choose how many items per page to show
- Show only brands of the current category: enable this option to dinamically show only the brands of the current category. This option is useful if you are displaying this block on a category page or on a filtered page.
- Enter the list of category slugs (separated with a comma) to show. Leave empty to show all categories. This option overrides the previous option.
- Enter the list of brand slugs (separated with a comma) to show. Leave empty to show all brands.
- Enter the parent brand ID to show. All the sub-brands will be displayed. Leave empty to show all brands.
- Order by – choose here how to sort the displayed brands:
- Term ID
- Order – if any order option has been selected, choose whether to sort them:
- Show items count for each brand: this allows you to show a counter with the total number of products in each brand.
- Hide brands with no products: choose whether or not to hide brands that do not include any product.
The same options are available in the shortcode as attributes. Below you find all the attributes and their accepted values.
- ‘title’: [yes / no] shortcode title
- ‘autosense_category’: [yes / no] if set on ‘yes’ only brands associated to products belonging to the current category will be shown in category page.
- ‘category’: [slug / all] show brands of one or more product categories; you can specify more than one category slugs and separate them with commas (shoes,jacket) or select them all by specifying the value ‘all’ for the attribute.
- ‘show_count’: [yes / no] show the number of products associated to each brand
- ‘hide_empty’: [yes / no] hide brands with no products associated
[yith_wcbr_brand_select title="Brand Select" hide_empty="no" show_count="yes"]