Limited time Launch offer — 50% off every plan See plans

The [aap_compare] Shortcode

Docs › Shortcodes

builds a side-by-side table from a list of ASINs, with optional price, rating and Prime columns, your own custom rows, and highlight ribbons on the columns you want to win.

In one line — three products, prices shown, the first column badged.

Every attribute

Attribute Default What it does
asins empty Required. Comma-separated ASINs, one column each. Empty means the shortcode renders nothing.
show_price 0 Set to 1 to add a price row.
show_rating 0 Set to 1 to add a star-rating row.
show_prime 0 Set to 1 to add a Prime-eligibility row.
custom_fields empty Your own rows. Format below.
best empty Which columns get a highlight ribbon, by position.
best_labels Best Choice,Best Price,Top Pick,Great Value The ribbon text, matched to best in order.

The three show_ attributes are off by default. A bare gives you images, titles and buttons and nothing else. That surprises people who expect a comparison table to compare something.

Custom rows

This is what turns a product grid into an actual comparison. The format is Label:value|value|value, and rows are separated by commas:

Values map to columns left to right. A row with fewer values than you have ASINs simply leaves the remaining cells empty, which is the right behaviour when a spec does not apply to one product.

A comma inside a value will break the row. Rows are split on commas before anything else, so Capacity:4L, 6L|8L is read as two separate rows and the second one has no colon, so it is discarded in silence. Use a different separator inside values — a slash or an en dash — or split the spec into two rows.

A chunk with no colon at all is skipped without warning. If a row you expected is missing from the table, a lost or curly colon is the first thing to check.

Highlight ribbons

best takes column positions, counting from 1:

That badges the first and third columns Best Choice and Best Price — the first two defaults, applied in the order the columns are listed. Override them positionally:

best="0" does nothing. Positions are parsed as integers and anything that evaluates to zero is dropped, so 0 and any non-numeric value disappear silently. If a ribbon is missing, you probably counted from zero.

If you list more best columns than you supply labels for, the four built-in defaults fill the gap, and past that the ribbon reads simply Best.

Making the table honest

A comparison table where one column wins every row is not a comparison, it is an advert, and readers recognise it immediately. Two habits keep it credible:

  • Let each product win something. If the cheapest option genuinely has the worst warranty, show the warranty row. The table is more persuasive when it is not unanimous.
  • Badge for different reasons. best_labels="Best overall,Best on a budget" tells the reader these are different recommendations for different people, which is usually the truth.

More on this in comparison tables that convert.

Common questions

How many products fit in one table?

Technically as many as you list, but the table scrolls sideways on a phone past about three columns. Three or four is the practical ceiling for a table people actually read.

Why is my custom row missing?

Almost always a comma inside a value, or a missing colon. Both cases are discarded silently rather than rendering a broken row. Check the row against the Label:value|value format exactly.

Can I show prices without Amazon credentials?

No. Without connected credentials the plugin does not display a price at all, because Amazon does not permit showing a price obtained outside the API. The row is omitted rather than left blank.

Is there a visual builder for this?

Yes — the Compare Builder tab builds the table with the options in front of you and gives you the finished shortcode to paste. It is quicker than hand-writing a long custom_fields string, and it cannot produce the comma bug.

Next