The product slider shortcode can be used anywhere on the website to display all or selected products images in a robust presentation. Each product image points to the product page.
To show the slider use [product_slider] shortcode. Attributes available:
- include – a list of comma separated product IDs to include in a slider (only selected products will be included)
- exclude – a list of comma separated product IDs to exclude from the presentation (slider will contain all products except those specified)
- main – to show only main product images (the default setting), if you need to show also additional product images set it to 0
- width – the percentage width for slider (number only)
- size – set one of image sizes (default is product-slider which is generated from slider setting), WordPress default image sizes can be used here: full, large, medium and thumbnail. Any image size can be created by adding a size to theme functions.php or with image sizes free plugin.
Example of product slider usage with attributes:
[product_slider size=”medium” include=”123,241,698″] – this will show product slider with main images for 3 products: 123, 241 and 698.