Skip to content

Shortcodes

Alberto de Vera Sevilla edited this page Feb 10, 2020 · 13 revisions

Display all brands

Adds to your page a paginated list with all brands and shows the logo for each of them.

Params:

  • "per_page": [int] Brands shown at a time per page
  • "image_size": [thumbnail / medium / large / full / custom size] Brand image size
  • "hide_empty": [true / false] It hides brands that have no products associated
  • "order_by": [name / rand] Brands order by
  • "order" [asc / desc] Brands order
  • "title_position" [none / before / after] Show brand title

Example:

[pwb-all-brands per_page="10" image_size="thumbnail" hide_empty="false" order_by="name" order="ASC" title_position="before"]


A-Z Listing

Shows a complete list with all non empty brands organized by name. This is perfect for create a "Brands" page in a large store with hundred of brands.

Params:

  • "only_parents": [true / false] If is set to true, it only lists first level brands

Example:

[pwb-az-listing]


Display brands carousel

Allows you to show a list with brands in a slider.

Params:

  • "items" [int / featured] Total number of brands
  • "items_to_show" [int] Number of brands per page
  • "items_to_scroll" [int] Number of brands to scroll each time
  • "image_size" [thumbnail / medium / large / full / custom size] Brand image size
  • "autoplay" [true / false] Carousel autoplay
  • "arrows" [true / false] Show or not the navigation arrows
  • "hide_empty" [true / false] It hides brands that have no products associated

Example:

[pwb-carousel items="10" items_to_show="5" items_to_scroll="1" image_size="thumbnail" autoplay="true" arrows="true" hide_empty="false"]


Display product carousel by brand

Shows shop products that are associated to a brand in a slider.

Params:

  • "brand" [all / brand slug]
  • "products" [int] Total number of products
  • "products_to_show" [int] Number of products per page
  • "products_to_scroll" [int] Number of products to scroll each time
  • "autoplay" [true / false] Carousel autoplay
  • "arrows" [true / false] Show or not the navigation arrows

Example:

[pwb-product-carousel brand="all" products="10" products_to_show="5" products_to_scroll="1" autoplay="true" arrows="true"]


Products of specific brands

Shows shop products that are associated to one or more brands. This shortcode extends the default [products] shortcode.

Params:

  • "brands" [comma separated brand slugs] Show product associated to this brands
  • Inherited params from the WooCommerce [products] shortcode

Example:

[products brands="brand-slug"]


Display brands for a specific product

Allows printing brands of a specific product. If "product_id" is empty the shortcode will try to get this value by itself.

Params:

  • "product_id" [int / empty] Show brands for this product
  • "as_link" [true / false] Show brand image or a text link
  • "image_size" [thumbnail / medium / large / full / custom size] Brand image size

Example:

[pwb-brand product_id="5" image_size="thumbnail"]