affiliate-toolkit shortcodes: product boxes, lists and fields

All affiliate-toolkit shortcodes with every attribute: product boxes, lists, single fields and text links, plus the shortcode generator and blocks.

Shortcodes put your affiliate products into posts and pages: a complete product box, a list of products, a single value such as the price, or a plain text link. You do not have to type them by hand – the shortcode generator and the block editor build them for you. This article explains both and lists every attribute for the cases where you want to write or adjust a shortcode yourself.

Prerequisite: you have imported at least one product or created a list. If not, start with Import and display your first product.

A product box in the "box" template with predicate badge, image, star rating, list price, saving, price and buy button.
A product box rendered by [atkp_product] with the "box" template.

The shortcode generator

You find the generator under affiliate-toolkit → Shortcode Generator. In the classic editor it also opens from the affiliate-toolkit button above the editor. It guides you through three steps: type, source and configuration.

Step 1 – Type. Choose what you want to embed: a product box (single product with template), a product list, a single field (price, title …), a text link, a search form or a dynamic filter list. Search form and filter list need the Frontend Search & Filter module.

Step 1 of the shortcode generator: product box, product list, single field, text link, search form or dynamic filter list.
Step 1: choose the type of output.

Step 2: choose or import the product

Search your internal product database by title or ID and select the product (or the list) you want to show. This search only finds products you have already imported.

Step 2: searching the internal product database for "Nordklang" finds two headphones that can be selected for the product box.
Step 2: search the products you have already imported.

If the product is not in your database yet, switch to Import product: pick a shop, enter a keyword and import the product straight from the search results. It is selected automatically, so you continue with step 3 without leaving the generator. For lists you can create a new list in the same way, but only with the basic options – for everything else use the list editor.

Step 3: configure and copy

Choose the template, the button type and the alignment, decide whether the disclaimer is shown and add optional custom content. On the Advanced tab you can set CSS classes for container and elements and override the affiliate ID for Amazon or eBay. The generated shortcode is shown at the bottom – copy it to the clipboard and paste it into your post.

Step 3: template "wide", button type and alignment are chosen; the generated [atkp_product] shortcode is shown with a copy button.
Step 3: template, button type and alignment; the generated shortcode is ready to copy.

The alignment does not work with every template. If a box looks wrong, set the alignment back to "No alignment".

Blocks in the block editor

In the WordPress block editor you do not need shortcodes at all. Add the block affiliate-toolkit Product or affiliate-toolkit Product List and pick the product or list in the sidebar. There you can also import a product from a shop or create a new list, and choose template, button type and the disclaimer option. The editor shows a preview of the box.

The "affiliate-toolkit product" block in the WordPress block editor with product, template and button settings in the sidebar.
The "affiliate-toolkit Product" block with its settings in the sidebar.

Product boxes: [atkp_product]

The product shortcode outputs one product with a template. The minimal form only needs the product ID:

[atkp_product id='123' template='box'][/atkp_product]

All attributes with their defaults:

[atkp_product id='' ean='' asin='' shopid='' template='box' buttontype='notset' elementcss='' containercss='' hidedisclaimer='no' tracking_id='' offerstemplate='' field='' link='no' ajax_mode='none']Your content[/atkp_product]
AttributeDefaultDescription
id–Product ID, or the product's slug or title.
ean–Find the product by EAN instead of the ID. If it does not exist yet, affiliate-toolkit tries to import it from the shop given in shopid.
asin–Find the product by ASIN. If it does not exist and shopid is set, it is imported automatically.
shopid–Shop used for the automatic import via asin or ean.
templateboxTemplate ID or the name of a system template, e.g. box, wide, secondwide, detailoffers, datasheet.
buttontypenotsetWhich link the button uses: notset (global setting), link (affiliate link of the main product), addtocart, linkfallback (main product, cheapest offer if unavailable), minofferlink, maxofferlink; product with Frontend Product Pages, woocommerce with the WooCommerce Connector.
elementcss–Your own CSS classes for the elements.
containercss–Your own CSS classes for the container.
hidedisclaimernoyes hides the disclaimer for this box.
tracking_id–Overrides the affiliate/tracking ID for this output. Works for Amazon and eBay only.
offerstemplate–Template used for the other offers (price comparison) inside the box.
field–Outputs a single field instead of a box (see below).
linknoyes wraps the output in the affiliate link.
ajax_modenoneenabled or disabled overrides the global option "Load product displays via AJAX request" for this output.

The text between the opening and closing tag is passed to the template as custom content (placeholder content). If you leave out id on a product page or a WooCommerce product, the shortcode shows the product of that page.

The "wide" template for the Nordklang ANC 700 with features, pros and cons, price and buy button.
The same shortcode with template="wide".

Lists: [atkp_list]

The list shortcode outputs the products of a list you created under affiliate-toolkit → Lists.

[atkp_list id='' template='wide' buttontype='notset' elementcss='' containercss='' limit='0' randomsort='no' hidedisclaimer='no' tracking_id='' product_ids='' offerstemplate='' parseparams='no' itemsperpage='0' filter='' keyword='' shopid='' ajax_mode='none']Your content[/atkp_list]
AttributeDefaultDescription
id–List ID or list title.
templatewideTemplate ID or system template, e.g. bestseller, grid_2_columns, grid_3_columns, list_display.
buttontypenotsetSame values as for [atkp_product].
elementcss, containercss–Your own CSS classes.
limitdisplay settingMaximum number of products. Without the attribute the default from the display settings is used (0 = all products of the list).
randomsortnoyes shuffles the products on every page load.
hidedisclaimernoyes hides the disclaimer.
tracking_id–Overrides the tracking ID (Amazon and eBay).
product_ids–Comma-separated product IDs. They are shown as a list without creating a list first; id is ignored.
offerstemplate–Template for the other offers.
parseparamsnoyes reads GET/POST parameters and filters the products – this is how search result pages work.
itemsperpage0Number of products per page; enables paging with "Next page" links.
filter–Fixed filter in URL format: field=value&field2=value2.
keyword–Loads the list with this title. If it does not exist and shopid is set, a search list with 20 products is created automatically.
shopid–Shop for the automatic list creation via keyword.
ajax_modenoneenabled or disabled overrides the global AJAX loading option.

A list from product IDs

[atkp_list product_ids='123,124,125' template='grid_3_columns'][/atkp_list]

A list created from a keyword

[atkp_list keyword='bluetooth speaker' shopid='45' template='bestseller'][/atkp_list]

On the first call affiliate-toolkit creates a search list called "bluetooth speaker" in shop 45; afterwards the existing list is used.

Products and lists mixed: [atkp]

The general shortcode [atkp] accepts product IDs, product titles, list IDs and list titles in any combination. It is handy for editors who do not want to care about the difference between products and lists.

[atkp ids='123,124,567' template='wide' limit='5'][/atkp]
AttributeDefaultDescription
ids–Comma-separated product or list IDs or titles.
templatewideTemplate ID or system template.
limitdisplay settingMaximum number of products.
randomsortnoyes shuffles the products.
hidedisclaimernoyes hides the disclaimer.
tracking_id–Overrides the tracking ID (Amazon and eBay).
field, link–Single field or link, as with [atkp_product].
elementcss, containercss–Your own CSS classes.
ajax_modenoneOverrides the global AJAX loading option.

Shortcodes of the modules

Some modules add their own shortcodes. They are described in the matching articles:

If a shortcode shows nothing, temporarily disable "Hide error messages on the web page" in the display settings. The box then shows the reason, for example "product (name) not found".