Products shortcode

The Prodigy Products shortcode allows you to display a list of specific products in either a slider or grid view.  This shortcode is demonstrated on our demo home page in the featured products section.

sc-products-slider.png

Example Usage

Show specific products by ID in three columns with ordering

[prodigy_products product_ids="1,2,3" columns="3" orderby="id" order="ASC"]

Show all products with a specific Tag in slider view

[prodigy_products tags="featured" display="slider"]

Show all products in specific Categories that are on sale in grid view

[prodigy_products category_ids="1,2" display="grid" on_sale="true"]

Available Attributes

product_ids

Accepts a list of comma separated Product IDs to display.  You can find the Product IDs in the WordPress Admin by navigating to Prodigy -> Products and looking for the ID column.

[prodigy_products product_ids="1,2,3"]

category_ids

Accepts a list of comma separated Category IDs and displays all products in those categories.  You can find the Category IDs in the WordPress Admin by navigating to Prodigy -> Categories and looking for the ID column.

[prodigy_products category_ids="1,2"]

product_names

Accepts a list of comma separated Product Name slugs to display.

[prodigy_products product_names="atomic-endurance-running-tee, layla-tee"]

columns

Determines the number of product columns per row that will be displayed.  The default value is 4 columns per row if not specified.

[prodigy_products columns="3"]

number_items_per_page

Determines the number of products per page that will be shown when the display attribute is set to grid. The default value is 9 products per page.

[prodigy_products display="grid" number_items_per_page="8"]

limit

Limits the number of products returned.  For example, if the other attributes specified in the shortcode match 8 products and the limit attribute is set to 4, then only the first 4 matching products will be displayed.

[prodigy_products limit="4"]

tags

Accepts a comma separated list of product tags and displays all products associated with those tags.

[prodigy_products tags="featured,sale"]

orderby

Allows you specify the order in which the products will be displayed.  Acceptable values are: id, title, price, date, rating

[prodigy_products orderby="price"]

order

Determines if the sort order will be ascending or descending.  Acceptable values are: ASC, DESC

[prodigy_products orderby="price" order="ASC"

on_sale

Allows you to restrict the returned products to only those that are on sale.  Acceptable values are:  true, false.  If set to true, only matching products that are currently on sale will be displayed.  If set to false, all matching products will be displayed regardless of sale status.  Default if false.

[prodigy_products on_sale="true"]

display

Determines if products will be displayed in slider or grid view.  Acceptable values are:  slider, grid.  Default is slider.

[prodigy_products display="grid"]

sale

Determines if the sale badge will be displayed on products that are currently on sale.  Acceptable values are: yes, no.  Default is yes.

[prodigy_products sale="yes"]

category

Determines if the category of each product will be displayed just below the image.  Acceptable values are yes, no.  Default is yes.

[prodigy_products category="yes"]

rating

Determines if the star rating will be shown below the title of each product. Acceptable values are yes, no.  Default is yes.

[prodigy_products rating="yes"]

Template Override

The template used by this shortcode can be overridden by copying the template into your theme or child theme and then editing.

Copy from:

prodigy-commerce/templates/partials/shortcode/feature_products.php
prodigy-commerce/templates/partials/shortcode/feature_products_grid.php

Copy to:

<your-theme>/prodigy/shortcode/feature_products.php
<your-theme>/prodigy/shortcode/feature_products_grid.php

 

Build WordPress stores with modern technology

Sign up to use the Prodigy platform, a powerful alternative to WooCommerce. Prodigy is free at ANY scale.

Create an Account