Shortcode & block
Place a recommendation list on any page: for the product being viewed, a specific product, or the shopper's cart.
Shortcode
[siteryn_ai_recommendations] [siteryn_ai_recommendations product_id="123" limit="8" columns="4" title="Complete the look"]
| Attribute | Default | Values |
|---|---|---|
product_id | The product being viewed, else the cart contents | A product ID. With neither, nothing shows |
limit | The product page's Number of Products | 1–12 |
columns | The limit, at most 4 | 1–6 on desktop; tablets show at most 3, phones 2 |
title | The product page Heading | "" for no heading |
heading | h2 | h2, h3, h4 |
title_align | The product page Heading Alignment | left, center, right |
The General tab's sidebar has the shortcode with a Copy button. The shortcode has no class attribute; use the template tag for that.
Block
Add the AI Product Recommendations block (WooCommerce category).
| Setting | Default |
|---|---|
| Recommendations → Product ID | 0: "Leave at 0 to use the product being viewed, or the cart contents." |
| Recommendations → Number of products | 4 (1–12) |
| Recommendations → Columns (desktop) | 4 (1–6) |
| Heading → Show heading · Heading text · Heading level | On · empty uses the heading from the plugin settings · H2 (H2, H3, H4) |
It supports wide and full alignment and margin and padding controls. The heading uses the product page Heading Alignment. In the editor, enter a product ID to preview a list; if that product has none yet, the preview says "No recommendations are available for this product yet."
Cart recommendations
On the cart page or elsewhere without a product, the list recommends for the products in the shopper's cart, most recently added first. It is scored with the same rules as a product page list, and uses the AI picks of up to 5 cart products, taking turns between them. Pro adds automatic cart and checkout placements.
Template tag
<?php siteryn_ai_product_recommendations( array( 'product_id' => 123, 'limit' => 4, 'title' => 'Pairs well with' ) ); ?>
See the Developer guide.