Shortcodes and blocks at a glance

All shortcodes of the plugin with their attributes and an example each – plus the matching blocks.

You identify products by their identifier: the central ID from affilinode or asin:…, gtin:…, mpn:brand/mpn and atkp:<post ID>. Short forms are asin="…" and ean="…". All shortcodes also know locale (e.g. en-GB), country (e.g. AT) and render (server, hybrid or ajax).

Since plugin version 0.30, the shortcodes are called [affilinode_…]. The former names [ac_…] keep working as long as "Keep supporting old shortcodes [ac_…]" is on in the settings (default). The shortcode generator creates the new names. You can also get a box's shortcode in the dashboard: the "Generate code" dialog (sidebar or Alt + Shift + E, "Embed as box" on products and lists) shows it in the "WordPress" tab to copy.

Individual products

                  [affilinode_product id="123" template="box"]
                
  • affilinode_product: template = box (default), horizontal, compact or card; thumbs = 1 or 0; variants = 1 shows a variant picker; spare_parts = 1 shows matching spare parts; alternatives = 1 shows alternatives below the box (0 = never, empty = setting); glance = 1 shows "At a glance" below the box (0 = never, empty = setting); docs = 1 shows the product's documents (data sheet, manual, energy label) as links below the box; title = own title; title_style = short or detailed.
  • affilinode_products: grid of several products, ids="123,456,789", template = card (default), horizontal, compact or box, columns = 2 to 4 (default 3), title = heading above the cards, title_style = short or detailed.
  • Own templates from affilinode → Templates: template="custom:<slug>" on affilinode_product, affilinode_products, affilinode_list, affilinode_amazon_list, affilinode_deals and affilinode_context. See "Own box templates".
  • affilinode_offers: price comparison of all offers, id, limit (default 5), header = 1 or 0, title = own title, title_style = short or detailed. An Amazon entry without a price (see "Amazon as link only") appears as a button of its own below the table.
  • affilinode_button: buy button, id, shop = best (default), amazon, ebay or awin, label = own text, title = own title, title_style = short or detailed. Without an offer with a price, the button leads to the Amazon link without a price, if there is one.
  • affilinode_price_history: price history, id, days = 7 to 365 (default 90), height = 120 to 600 pixels, title = own title, title_style = short or detailed.
  • affilinode_price_alert: price alert form, id, title, target = suggested desired price.
  • affilinode_stock_alert: "Back in stock" form, as long as the product is available at no shop except Amazon, id, title. Below product boxes with stock_alert="1". Off by default (Settings → Price alerts). See ""Back in stock" notification for readers".
  • affilinode_spare_parts: spare parts of a device, id, template = grid or list, columns, limit (0 = all), title = 1 or 0 or a text of your own as the heading, title_style = short or detailed.
  • affilinode_accessories: accessories of a product (case, charger, cable – no spare parts), id, template = grid or list, columns, limit (0 = all), title = 1 or 0 or a text of your own as the heading, title_style = short or detailed.
  • affilinode_alternatives: cheaper, better-equipped products and successors as small cards with a reason, id, kinds = cheaper, better and/or successor with commas (order of the cards), limit = products per kind (1–6, default 1), view = grid or list, columns, scope = site, title (empty = "Alternatives to …", 0 = no heading). See "Alternatives".
  • affilinode_complements: "Goes well with" – other devices people often buy in addition, only confirmed "Fits with" pairs, id, limit = number (1–6, default 4), view = grid or list, columns, scope = site, title (empty = "Goes well with", 0 = no heading). See "Accessories".
  • affilinode_software: software profile – current version, release date, license, what is new in brief and links from the manufacturer, id, title (empty = "Software at a glance", 0 = no heading). Without recorded details the box stays empty.
  • affilinode_support: "How long will it get updates?" – the manufacturer's commitments, with a note when the period ends soon or is over, id, title (empty = "How long will it get updates?", 0 = no heading). Without a commitment the box stays empty.
  • affilinode_buytime: "Buy now or wait?" – places the current price within the product's own price history, with a note on sale days and yearly running costs, id, title (empty = "Buy now or wait?", 0 = no heading). The box shows no offer prices and no shop links.
  • affilinode_seals: seals and certificates of a product with a short explanation, id, title (empty = "Seals and certificates", 0 = no heading). Without a recorded seal the box stays empty.
  • affilinode_packing: packing list with a choice of climate and season and product suggestions, id = short name of the packing list from the dashboard, climate = hot, warm, mild, cold, freezing or rainy (default), season = spring, summer, autumn or winter (default), controls = 0 hides the choice for visitors, title (empty = "Packing list", 0 = no heading).
  • affilinode_trip_plan: trip plan with travel periods and building blocks (flight, accommodation, train …) and the partners' links, id = short name of the trip plan from the dashboard, title (empty = "Trip plan", 0 = no heading).
  • affilinode_glance: "At a glance" – the most important key values as tiles, each ranked against the product type ("better than 80 % of smartphones"), id, count = number (1–12, default 6), fields = field keys with commas, button = 1 button to the best offer, title (empty = "At a glance", 0 = no heading), heading = 2 or 3. See "At a glance".
  • affilinode_energy: running costs – electricity and water costs per year and over several years according to the EU energy label, id, compare = second product to compare, years (1–20, default 5), price = electricity price in ct/kWh, water = water price in €/m³, cycles = cycles per week, hours = hours per day, button = 1 button to the best offer, title, heading = 2 or 3. See "Running costs".
  • affilinode_coupons: merchants' coupons and promotions from Awin, Tradedoubler, Webgains and CJ (or your own from the dashboard), merchant = merchant, product = only merchants with an offer for this product, shop = shop ID, kind = code, offer, free_shipping, limit (1–50, default 6), title, heading = 2 or 3. Below product boxes with coupons="1" or the setting. See "Coupons".
  • affilinode_packs: pack sizes – per size (single, 2-pack, 3-pack …) the cheapest offer with unit price and saving per piece, id, sort = quantity or unit, only_available = 1, title, heading = 2 or 3. In the price comparison packs="tabs" (a tab per size) or packs="hint", below product boxes packs_box="1". See "Pack sizes".
  • affilinode_details: description, pros and cons and technical data of a product as text and table, id, show = description, proscons and/or specs with commas (default all three), heading = 2 or 3 (level of the headings). Empty sections are omitted.
  • affilinode_rating: your own test rating with score, test date, verdict, criteria, pros and cons, badge and button, id, title = own heading, criteria, proscons and button = 0 hide that part (see "Test rating"). rating = 1 in affilinode_product and affilinode_products shows the test score in the box.
                  [affilinode_details id="123" show="specs" heading="3"]
                
                  The [affilinode_link asin="B0CXYZ1234" text="router" price="1"] is currently available for [affilinode_field asin="B0CXYZ1234" field="price"].
                
  • affilinode_link: text link to the cheapest offer, text = link text (default: product title, also as [affilinode_link …]Text[/affilinode_link]), price = 1 appends the current price, shop = best, amazon, ebay or awin.
  • affilinode_field: a single value, field = price (default), title, link, button, url, shop, availability, stars, rating, reviews, image, thumb, brand, description, list_price, amount_saved, percentage_saved, last_update, asin or sales_rank (Amazon bestseller rank, e.g. "No. 197 in Electronics & Photo" – only if Amazon supplies a rank, and at most 24 hours old); text = own title, image = image number from 1, shop as with the text link. There is no prime field: Amazon no longer supplies the Prime flag through the API.
  • Both always appear the same in the page's HTML. Links carry rel="sponsored nofollow noopener" and count in the click statistics as a box type of their own ("Text link", "Product field"). Prices appear only with a current status; price status and affiliate disclosure are in the tooltip.
  • Mini card (optional, Settings → Appearance → "Mini card when hovering over text links", off by default): when the mouse pointer rests on a text link or it gets keyboard focus, a small card floats above it with image, title, price with status and affiliate disclosure – also on automatic links to products and on field="link". Prices only as long as they are current, Amazon prices at most 24 hours old; otherwise only the shop. The text doesn't shift, Escape closes the card, on touchscreens nothing happens (a tap opens the link). Per link: preview="1" or preview="0".
  • In the block editor: select text in the paragraph and choose "affilinode link" in the format bar (arrow) – the generator opens with the text link and puts the shortcode in place of the selection. As a paragraph of its own there are the blocks "Text link" and "Product field".
  • In the theme: echo affilinode_field( 'asin:B0CXYZ1234', 'price' ); or echo affilinode_link( 'asin:B0CXYZ1234', array( 'price' => '1' ) ); – the same attributes as the shortcodes, the return value is finished, escaped HTML.

Lists, comparisons and deals

                  [affilinode_list id="bestenliste" template="grid" columns="3" limit="10"]
                
  • affilinode_list: list from affilinode, id or view (category view), template = grid or list, columns, limit (0 = all), title = 0 hides title and description, ranking = rank numbers, replace = notice, silent or off.
  • affilinode_compare: comparison table, ids="123,456" – with the switch "Show differences only". table = ID of a table saved under "Comparison tables" (instead of ids), rows = rows and order (e.g. price,rating,field:display_size), highlight = highlighted product (position or identifier), badge = text for it (e.g. Test winner), title = heading above the table, title_style = short or detailed.
  • affilinode_compare_picker: readers put their comparison together themselves, type = product type, max = 2 to 5, ids = preselection, title, title_style = short or detailed.
  • affilinode_deals: products whose best price has just dropped, type = product types with commas, min = minimum saving in percent (default 10), limit (default 8), template = list or grid, columns, title.
  • affilinode_calculator: tariff calculator from CHECK24, Tarifcheck & co., key = the calculator's key from "affilinode" → "Tariff calculators", consent = click or direct.
                  [affilinode_deals type="smartphone,tablet" min="15" limit="6" template="grid" columns="3"]
                

Product search with filters

affilinode_search (block "Product search") sets up a search and filter page: a search field with results as you type, next to it filters with hit counts, below them the products as cards or rows with page buttons. On a phone the filters open in a window of their own.

                  [affilinode_search type="cordless_drill_driver" facets="brand,price,availability,field:voltage" per_page="12" view="grid"]
                
  • type = product type (including subtypes), empty = all your products. In the block you choose the category from the list.
  • facets = which filters in which order: brand, price (current price from–to), availability (available) and data sheet fields as field:<field>, e.g. field:display_size. Choice and yes/no fields appear as checkboxes with a number, number fields as from–to. Empty = brand, price, availability and the most important fields of the product type.
  • per_page = hits per page (1–48, default 12), view = grid or list, columns, title, title_style, tracking.
  • scope = site searches only the products this website already embeds; empty = all products of your account.
  • Several values of one filter apply with "or", different filters with "and". The numbers next to the values already take the other filters into account.
  • The search state is in the address (e.g. ?acs_q=bosch&acs_f[brand][]=Bosch). Filtered pages can be shared and linked; without JavaScript the search works as a normal form. One search per page.
  • Prices: filters and sorting by price use only current prices (Amazon at most 24 hours old), eBay offers from the eBay API don't count. There is no sorting by saving (Amazon: price signal).
  • The number of hits is announced to screen readers; clicks count in the reports as box type "Product search".

Compatibility check "Does this fit my …?"

affilinode_compat (block "Compatibility check") lets visitors choose their system – smart home hub, ecosystem, radio standard, battery system, processor socket or lens mount – and shows the matching products with the note "Compatible according to <source>". With product, the box checks a single product and answers with Yes, No or Unknown, including reasoning and sources.

                  [affilinode_compat kind="hub" type="smart_plug"]
[affilinode_compat system="battery:boschprofessional18v" choose="0" type="cordless_drill_driver"]
[affilinode_compat product="<product ID>"]
                
  • system = preselected system as <kind>:<value>, e.g. hub:zigbee2mqtt, hub:zha, ecosystem:matter, radio:zigbee, battery:boschprofessional18v, socket:am5, lens_mount:sony_e. In the block and the generator you choose from the list of systems for which your products have data. choose="0" shows only this system without a choice.
  • kind = only these kinds selectable (hub, ecosystem, radio, battery, socket, lens_mount), type = only hits of this product type, product = check this product (also asin or ean) instead of listing products.
  • per_page (1–48, default 12), sort (empty = popularity, price, -price, title), view = grid or list, columns, title, title_style, tracking.
  • Where the information comes from: device lists of Zigbee2MQTT, ZHA, deCONZ, Z-Wave JS, Home Assistant, ESPHome, Tasmota and openHAB, the Matter certification, SmartThings and the technical data of your products. If you have overwritten or hidden a field yourself, your value applies.
  • "No" appears only for clear statements, e.g. a different battery system, a different socket or a Wi-Fi-only device with Zigbee2MQTT. If a list merely doesn't mention a system, the answer is "Unknown".
  • The chosen system is in the address (?acc_system=hub:zha); without JavaScript the box is a normal form. Source links lead only to the public device lists, never to Amazon. Clicks count as box type "Compatibility check".

Best in the category (automatic top 3)

affilinode_top (block "Best in the category") shows the best products of a product type from your account – including subtypes, without variants – as a podium with place 1 in the middle, a badge on place 1 and a reason per place ("Best test score: 1.4 (very good)", "Most mAh per euro"). The ranking is created anew on each request and thus follows new test scores, data sheets and prices by itself.

                  [affilinode_top type="smartphone" by="rating" limit="3"]
[affilinode_top type="smartphone" by="value"]
[affilinode_top type="power_bank" by="value:battery_capacity"]
[affilinode_top type="smartphone" by="field:battery_capacity" badge="Best battery"]
                
  • by="rating" (default): your test score from the test ratings in the dashboard, badge "Test winner".
  • by="value": value for money – the key values of the product type (e.g. battery, storage, camera) relative to the best product, divided by the current price; badge "Value-for-money winner". by="value:<field>" takes a single value per euro ("Most mAh per euro"). Only products with a current price count; those with fewer than half the key values don't make it into the ranking.
  • by="field:<field>": a data sheet value; whether more or less is better comes from the product type (e.g. less weight). Badge "Best value: <value>" – with badge="…" a text of your own such as "Best battery". In the block and the generator you choose "Data sheet value" and enter the field key.
  • limit (1–10, default 3), view = podium (default), grid or list, columns (grid), scope="site" only products of this website, available="0" also products without a current price (not for value for money), reasons="0" without reasons, title (empty = automatic heading), title_style, tracking.
  • Prices count only when current (Amazon at most 24 hours old, eBay API offers not); the reasons never name prices, savings or lowest prices. If your account uses Amazon, the box shows no value-for-money ranking (by="value") – it compares current prices, which the Amazon affiliate program doesn't allow on such websites; editors then see a note. Test score and data sheet values always work.
  • The ranking is cached for five minutes. On wide areas the podium shows place 2 – 1 – 3; screen readers and keyboard always go 1, 2, 3. Clicks count as box type "Best in the category".

Value-for-money chart

affilinode_scatter (block "Value-for-money chart") shows the products of a product type from your account as a scatter chart: to the right the current price, upwards a data sheet value such as battery capacity or torque – one dot per product. A line below the heading says where "better" lies (e.g. "further left and further up"); the highlighted product, usually the post's own, is larger, outlined and labelled.

                  [affilinode_scatter type="cordless_drill_driver" field="torque_max"]
[affilinode_scatter type="smartphone" field="battery_capacity" highlight="<product ID>"]
[affilinode_scatter type="power_bank" field="battery_capacity" scope="site" table="1"]
                
  • field: a number field of the product type (field key, e.g. battery_capacity, weight, torque_max); the axis shows its unit. Whether more or less is better comes from the product type.
  • highlight: product ID or identifier (e.g. asin:B0…). It always appears, even as an outlier; if it lacks the current price or the value, editors see a note. In the block and the generator, the chosen product is the highlighted one.
  • limit (1–100, default 60; with more products, the most popular), scope="site" only products of this website, height = 240, 320 or 400 (empty = automatic), table="1" table expanded, title (empty = automatic heading), tracking.
  • Each dot is a link to the offer its price comes from – with click tracking and reachable by keyboard. Pointer or focus shows title, price, value and shop. Below, all values are in a collapsible table (also for screen readers and without JavaScript). Extreme outliers (e.g. a gold-plated collector's model) drop out and are counted.
  • Prices count only when current (Amazon at most 24 hours old, eBay API offers not); the dots are cached for five minutes. If your account uses Amazon, the chart appears only if no price in it comes from Amazon – it compares current prices, which the Amazon affiliate program doesn't allow on such websites. Visitors then see nothing, editors a note (scope="site" often helps). Clicks count as box type "Value-for-money chart".

With view="carousel", affilinode_list, affilinode_products, affilinode_amazon_list, affilinode_deals and affilinode_context show their cards in a row through which visitors swipe, scroll or page with the arrows at the top right. In the block, in Elementor and in the shortcode generator, the display is called "Carousel".

                  [affilinode_list id="<list ID>" view="carousel"]
[affilinode_products ids="…" view="carousel" columns="4"]
[affilinode_list view="<view>" template="carousel" autoplay="6"]
                
  • columns (2–4) determines how many cards are visible side by side on wide areas; on narrower ones it becomes two, on a phone one with the next card peeking in. The width is fixed – nothing jumps while loading and paging.
  • A category view as a carousel: template="carousel" (view there is the name of the view).
  • No automatic advance unless you set autoplay="<seconds>" (3–30). Then a button to stop appears; the advance pauses while the pointer rests on it and stops as soon as keyboard focus enters. With "reduce motion" in the operating system it doesn't start by itself.
  • Accessible following the W3C carousel pattern (APG): a "Carousel" region with a name, slides "2 of 8", labelled buttons, arrow keys from card to card as well as Home/End, a status line for screen readers ("Products 4 to 6 of 8"). Without JavaScript a scrollable row with all cards remains.
  • No library: the small script loads only on pages with a carousel.

Sort and filter per shortcode

Lists, product grids and Amazon bestsellers can be sorted and filtered differently in a post without changing the list in affilinode (like orderby and filter in AAWP). When sorting or filtering, the plugin loads the whole list and only then trims to limit.

                  [affilinode_list id="bestenliste" sort="price" only_available="1" limit="3"]
                
  • sort = price (cheapest first), -price (most expensive first), rating (customer rating), discount (saving against the shop's strike-through price), title (alphabetical) or position (order of the list, default). With sorting, the rank numbers are counted anew. In affilinode_amazon_list the attribute is called order, because sort there chooses bestsellers or new releases.
  • only_available = 1 shows only products with an available offer (after replacement products), min_discount = 10 only products with at least 10 % saving, brand = brands with commas (e.g. brand="Bosch,Siemens"), limit = maximum number afterwards.
  • Applies to affilinode_list (also with view), affilinode_products and affilinode_amazon_list; affilinode_deals knows sort and brand, affilinode_offers knows only_available = 1 (without unavailable offers).
  • Only the price that is also displayed counts: the current best price of a shop. Outdated prices and eBay offers from the eBay API (block of its own) count neither for the price nor for the saving; products without a value come last.
  • Amazon: without a written exception, sorting and filtering by saving count as price signals (policy 6(y)) – discount and min_discount are then ignored, signed-in editors see a note. Sorting by the current price still works.
  • Blocks, Elementor and the shortcode generator (under "Advanced") offer the same fields. In the embed (Ghost, Discourse, HTML), list and deals know data-sort = price, -price, rating or title and data-only-available = 1.

Hide unavailable single boxes

hide_unavailable = 1 on affilinode_product, affilinode_button, affilinode_link or affilinode_field hides the box if the product is available at no shop. An available successor or alternative takes precedence (setting "Show replacement product") – then the replacement appears as before. Otherwise visitors see nothing, signed-in editors a short note. The setting "Hide unavailable single boxes" (Appearance, off by default) applies to all product boxes and buttons; hide_unavailable = 0 keeps a single box anyway. Text links and fields in running text hide only with the attribute, so that no sentence loses a word.

                  [affilinode_product asin="B0CXYZ1234" hide_unavailable="1"]
                

Blocks and shortcode generator

In the block editor there are the same displays as blocks, e.g. "Product box", "Product grid", "Product list", "Deals", "Price comparison", "Product comparison", "Comparison picker", "Product search", "Product advisor", "Compatibility check", "Best in the category", "At a glance", "Value-for-money chart", "Running costs", "Price history", "Price alert", "Tariff calculator", "Spare parts", "Accessories", "Buy button", "Text link" and "Product field". In the block you search for the product by title, brand, ASIN, EAN or MPN instead of typing IDs. If you prefer shortcodes, build them under "affilinode" → "Shortcode generator" with a live preview. The page "affilinode" → "Products" shows the finished shortcode for every product with a copy button.

The default render mode is "Hybrid": the box is in the HTML straight away and is only reloaded if the country differs or the prices are too old. This fits page caches.

A different Amazon tracking ID for a box or a post

Amazon links normally carry the website's tracking ID (Websites → Tracking IDs). For a single box you set tracking="…" – all shortcodes and blocks with affiliate links know it, including text link, single field, the Amazon bestsellers and the PHP functions. For a whole post there is the field "Amazon tracking ID for this post" in the block editor's sidebar (or on the right in the classic editor).

                  [affilinode_product asin="B0CXYZ1234" tracking="myblog-21"]
                
  • Precedence: box before post before website. Only the tag parameter of Amazon links is replaced; other shops, click statistics and Matomo stay as they are.
  • Letters, digits and hyphens are allowed, at most 64 characters (e.g. myblog-21). Invalid values don't count – signed-in editors see a note on the box.
  • Boxes loaded later (Ajax, hybrid) and the comparison picker use the same tracking ID as well.
  • For the reporting under "Earnings", the plugin reports such tracking IDs to affilinode when saving; they then appear under Websites → Tracking IDs → "More tracking IDs (reporting only)", and sales with them are attributed to the website or subsite.

All help articles · Still a question? Write to us