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.

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 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.

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.](/images/screenshots/en/kb-affiliate-toolkit-wordpress-shortcodes--generator-config.webp)
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.

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]
| Attribute | Default | Description |
|---|---|---|
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. |
template | box | Template ID or the name of a system template, e.g. box, wide, secondwide, detailoffers, datasheet. |
buttontype | notset | Which 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. |
hidedisclaimer | no | yes 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). |
link | no | yes wraps the output in the affiliate link. |
ajax_mode | none | enabled 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.

Single fields and text links
To mention a product in running text, output a single field or a link instead of a box:
[atkp_product id='123' field='title'][/atkp_product]
[atkp_product id='123' field='price'][/atkp_product]
[atkp_product id='123' field='title' link='yes'][/atkp_product]
[atkp_product id='123' link='yes']Buy now on Amazon[/atkp_product]
field takes the name of a product placeholder, for example title, price, listprice, save_percentage, star_rating, manufacturer or smallimage. With link='yes' the field becomes a link. Without a field, the text between the tags is linked, or the product title if there is none.

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]
| Attribute | Default | Description |
|---|---|---|
id | – | List ID or list title. |
template | wide | Template ID or system template, e.g. bestseller, grid_2_columns, grid_3_columns, list_display. |
buttontype | notset | Same values as for [atkp_product]. |
elementcss, containercss | – | Your own CSS classes. |
limit | display setting | Maximum number of products. Without the attribute the default from the display settings is used (0 = all products of the list). |
randomsort | no | yes shuffles the products on every page load. |
hidedisclaimer | no | yes 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. |
parseparams | no | yes reads GET/POST parameters and filters the products – this is how search result pages work. |
itemsperpage | 0 | Number 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_mode | none | enabled 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]
| Attribute | Default | Description |
|---|---|---|
ids | – | Comma-separated product or list IDs or titles. |
template | wide | Template ID or system template. |
limit | display setting | Maximum number of products. |
randomsort | no | yes shuffles the products. |
hidedisclaimer | no | yes 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_mode | none | Overrides the global AJAX loading option. |
Shortcodes of the modules
Some modules add their own shortcodes. They are described in the matching articles:
[atkp_searchform]and[atkp_livelist]– search form and live list of Frontend Search & Filter, see Set up product search for affiliate products.[atkp_linktree]– the link page of Influencer Links.[asa],[asa2]and[amazon]– existing shortcodes of other plugins, see Compatibility mode for ASA1, ASA2 and AAWP.
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".