Docs › Shortcodes
is the shortcode you will use most. It renders one product, a hand-picked set, or a keyword search, in one of five layouts. Everything else in this section is a specialised version of it.
In one line renders one box. Add more ASINs for a grid, or template= to force a layout.
Every attribute
| Attribute | Default | What it does |
|---|---|---|
asin |
empty | One ASIN, or several separated by commas. Whitespace around each is trimmed, so "B01, B02" is fine. |
keyword |
empty | A search phrase. Only used when asin is empty — Amazon picks the products, you do not. |
limit |
1 |
How many results a keyword search returns. Ignored entirely when you pass ASINs. |
badge |
Our Pick |
The ribbon text on the single-product box. |
template |
empty | horizontal, vertical, grid, list or table. Empty means decide from the count. |
grid |
empty | Forces the column count in grid layout. Otherwise the plugin picks from the number of products. |
asin wins over keyword
If both are present, asin is used and keyword is ignored. If neither is present the shortcode returns an empty string — no error, no placeholder, nothing in the page source. That is deliberate: a broken box in a published article is worse than no box.
An empty result is not always your mistake. The shortcode also returns nothing when the data source is unreachable or the ASIN does not exist in your marketplace. Same silence, different cause — check the Amazon API tab before rewriting the shortcode.
The five layouts, and what happens when you do not choose
With no template, one product renders horizontal and several render grid. Two further rules catch the awkward cases:
- An unrecognised
templatevalue is discarded silently and the automatic rule applies. There is no error message, so a typo liketemplate="horizantal"looks like the attribute was ignored — because it was. template="grid"with a single product is switched tovertical, because a one-column grid and a tall card are the same thing.
| Shortcode | Renders |
|---|---|
|
One horizontal box with the badge ribbon |
|
One tall card |
|
A three-column grid |
|
The same three, forced into two columns |
|
A ranked vertical list |
|
A compact table row per product |
|
Five matches chosen by Amazon |
The badge
The badge ribbon appears on the single-product box. It is plain text, so keep it short — long values wrap awkwardly on a phone:
When to avoid keyword
A keyword search hands editorial control to Amazon. The products it returns change without warning, which means the article can silently start recommending something you have never assessed. It is genuinely useful for a ticker or a sidebar unit; it is a poor fit for the main recommendation in a review.
This matters for compliance, not just quality. If your article says you tested three specific products and the shortcode is quietly serving whatever ranks today, the claim is no longer true. Pin the products with asin anywhere you make a claim about them — see reviewing a product you do not own.
Titles and disclosure are handled for you
Two things are applied to every render, so you do not pass them per shortcode:
- The title length limit from the Display tab is applied to every product title, so a 180-character Amazon title does not wreck the layout.
- The affiliate disclosure is printed above or below the box, depending on the Display tab setting. The exact wording matters legally.
Common questions
Why is my limit attribute being ignored?
Because you also passed asin. limit only caps a keyword search; with explicit ASINs you get exactly the ones you listed, in the order you listed them.
Can I mix ASINs and a keyword to top up a short list?
No. It is one source or the other, and asin always wins. To combine them, use two shortcodes.
Does the order of my ASINs matter?
Yes — products render in the order you write them, so the first ASIN is the top of a list and the first cell of a grid. There is no automatic ranking.
Why does a four-column grid look wrong on mobile?
grid sets the column count for wide screens; the layout collapses on narrow ones regardless. Four columns of product cards is usually too many even on a desktop — two or three reads better and loads faster.
Next
- Comparison tables with
— when a grid is not enough. - Inline text links with
. - Publishing your first product box — the walkthrough, if you have not done one yet.