Vis produkt med shortcode

Sådan viser du et produkt med en shortcode.

[products limit=”9″ columns=”3″ orderby=”popularity” class=”quick-sale”]

Indsæt shortcoden ved hjælp af den særlige shortcode blok, hvor du fx kan skrive:

[products limit="9" columns="3" orderby="popularity" class="quick-sale"]

Læg mærke til, at du med parametrene kan definere, hvordan produktet skal vises på din side:

  • Limit: hvor mange produkter vil du vise?
  • Columns: hvor mange kolonner skal vises?
  • Orderby: sorterer ved hjælp af parametre, som popularity, asc, desc etc.
  • Class: har i dette tilfælde ikke noget at gøre med CSS; men derimod en grupering (her: Quicksale)

Woo skriver i dokumentationen, at du kan filtrere:

The [products] shortcode allows you to display products by post ID, SKU, categories, attributes, with support for pagination, random sorting, and product tags, replacing the need for multiples shortcodes such as  [featured_products][sale_products][best_selling_products][recent_products][product_attribute], and [top_rated_products], which were needed previously.

Læs mere om Woo shortcodes her:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enable Notifications OK No thanks

We use cookies - more information

Multimusen.dk will set a few cookies from Doubleclick, Google and the Social Media plugins they ay set some cookies. Some of my pages use APIs - such as YouTube, LinkedIn, Google Fonts, Google Maps, Mapbox, Spotify, Jetpack, Twitter, Facebook &c.. Such plugins may set the odd cookie.

Close