The WP Amazon price plugin is designed to do one thing, but do it well – display the price for any item at Amazon, anywhere in your WordPress site. All you do is enter a shortcode containing the Amazon items ASIN, in a post or a text widget, (or any other part of your theme files for advanced users).
When the page is viewed, the plugin queries Amazon for the current price and replaces the shortcode with the actual price.
There are currently 2 shortcodes, one which displays the list price and one which displays the sale price. This lets you show readers how much money they are saving. Of course you can use just one or the other wherever you need them.
In the plugin dashboard, you can choose to refresh the price every time the page is loaded or you can tell the plugin to remember the price for a set period to reduce bandwidth usage.
The shortcodes can have any normal HTML formatting applied, and the price will inherit these styles when it is displayed. So you can make your price part of your affiliate link, enclose it in <STRONG> tags, or color it green.
*Note – the current version only supports the US version of Amazon.
Installation
- Sign up to Amazon Web Services to obtain your Access Key ID and Secret Access Key. Instructions on finding these are here: http://s3.amazonaws.com/mturk/tools/pages/aws-access-identifiers/aws-identifier.html
- Install the plugin as normal through your WordPress dashboard
- In your WordPress dashboard go to Settings > Amazon Price and enter your Amazonaccess keys
- Change the cache duration as desired. The amount of time selected will dictate how often the price is refreshed. It is recommended that this be left on ‘No Cache’ unless bandwidth use becomes an issue for larger sites.
Adding an Amazon price to posts or widgets
Enter the relevant shortcode, either in your post or in a text widget for your sidebar if desired, and replace ASIN in the example below with the actual ASIN of the item. The ASIN for any Amazon item can be found in the URL or under the ‘Product Details’ heading in the item description. It is recommended that you copy the ASIN from the URL to avoid picking up any special characters.
There are 2 shortcodes that you can use to display prices:
[aprice asin='ASIN']
This shows the current price for the item.
[alistprice asin='ASIN']
This shows the list price for the item, before any discounts.
Adding an Amazon price to your theme files
If you are manually editing your theme files to place Amazon items anywhere outside of the loop, use the following code to add a price, replacing ASIN with the items actual ASIN:
<?php echo do_shortcode("[alistprice asin='ASIN']"); ?>
This shows the list price for the item, before any discounts.
<?php echo do_shortcode("[aprice asin='ASIN']"); ?>
This shows the current price for the item.
Examples





