1. Home
  2. Docs
  3. AI Related Products Documentation
  4. Shortcode

Shortcode

To add AI Related Products Shortcode to your pages, posts and widget areas, please follow the instructions as given below.

Shortcode Details

Default Shortcode with default attributes:
[ST_WOO_AI_REL_PRODUCTS]

Shortcode with supported attributes

Column Layout (Optional) : [ST_WOO_AI_REL_PRODUCTS column="4"]
Column possibilities are 1, 2, 3, 4, 5, and 6 (the default is “3,” so choose one of these).

Include Cart Products For Reference (Optional) : [ST_WOO_AI_REL_PRODUCTS cart_ref="yes"]
Include items from the shopping cart to filter the related products. Options : yes / no (the default is “no”)

Number of Products (Optional) : [ST_WOO_AI_REL_PRODUCTS no_of_products="12"]
Set the number of products to display. Options: As you prefer (the default is “6”)

Number of Recently Ordered Products (Optional) : [ST_WOO_AI_REL_PRODUCTS order_ref="1"]
Set 1 as a reference to filter products by most recently ordered/purchased item, 2 for two most recently ordered/purchased items, and so on. For all ordered/purchased items, leave it empty. (the default is empty)

Additional Meta Filters (Optional) : [ST_WOO_AI_REL_PRODUCTS meta_filter="best-selling"]
Further, filter the products by choosing only those that are on sale, featured, or are the best-selling. Options: sale / featured / best-selling. (the default is empty, so choose one of these)

Shortcode with all attributes.
[ST_WOO_AI_REL_PRODUCTS column="4" cart_ref="yes" no_of_products="12" order_ref="1" meta_filter="best-selling"]

Note: If you want some attributes to have default value, then you don’t have to add it in the shortcode. You can use multiple shortcode with multiple settings anywhere in your site.

Adding shortcode in blocks.

  1. First search for shortcode block in your editor.
  2. Select the shortcode block.
  3. Please paste the shortcode with or without attributes according to your preference after adding the shortcode area to your editor.

Adding shortcode in classical editor.

You can just paste the shortcode in the editor where you want to add.