Datafeedr Price Comparison Shortcodes
To display comparison sets in your posts, pages or in other areas where WordPress shortcodes are allowed, use the [dfrcs] formats below.
Available Shortcode Fields
name brand title ean upc isbn asin gtin context filters
Examples
- Create a price comparison set using name field:
[dfrcs name="baratza encore"]
- Create a price comparison set using name and brand field:
[dfrcs name="j8006" brand="omega" ]
- Create a price comparison set using an Amazon ASIN code:
[dfrcs asin="B07BN6KH6W"]
- Create a price comparison set with a custom title:
[dfrcs name="chaos harness" brand="black diamond" title="{num_products} great deals on Black Diamond Chaos Harnesses"]
Pro Tip!
These are the available placeholders you can use in the title field:
- {product_name}
- {lowest_price}
- {highest_price}
- {num_products}
- {num_merchants}
Available Filters
currency amazon_locale image onsale direct_url saleprice_min saleprice_max finalprice_min finalprice_max merchant_id source_id
Examples
- Create a price comparison set using onsale filter:
[dfrcs name="farpoint 55" brand="osprey" filters="onsale=1"]
- Create a price comparison set using currency filter:
[dfrcs name="aeropress coffee maker" brand="aerobie" filters="currency=USD"]
- Create a price comparison set using multiple filters:
[dfrcs name="nomad 20 solar panel" filters="currency=USD&finalprice_max=400"]
- Create a price comparison set limited to specific merchants and networks:
[dfrcs brand="patagonia" ean="737416080066" filters="merchant_id=61316,33092,97391&source_id=126"]
Pro Tip!
Merchant IDs merchant_id (MID) and Network IDs source_id (NID) can be referenced here.
Using Different Comparison Templates
[dfrcs name="patagonia hoodie" context="template1"]
The Comparison Set will look for the template1.php file here:
/wp-content/themes/YOUR_THEME/dfrcs-templates/template1.php
Pro Tip!
It's strongly recommended to create a Child Theme otherwise one theme upgrade will remove all of your custom templates.