Amazon Wishlist Updated Again

I’ve added some functionality to the Amazon Wishlist plugin that allows the user to define where to display the output. As in the initial version, the output can be displayed immediately after the category listing. This option will be best for those not inclined to edit their templates in any way. The second option is to invoke a function named “get_amazon_wishlist()” within any template to display the information.

In order to display the book information as a coda to the category listing, one need only edit the plugin’s first line of uncommented code:

[php]
$aw_show_after_cats = 0;
[/php]

Setting this variable to 1 causes the book to be displayed automatically after the category listing.

Leaving the variable set to 0 suppresses the automatic display of the book. If you wish to apply the plugin to your templates manually, you’ll need to edit wp-includes/template-functions-general.php to add the following function:

[php]
function get_amazon_wishlist(){
echo amazon_wishlist(“”);
}
[/php]

Optionally, you could also just add the following inline within your template:

[php]
echo amazon_wishlist(“”);
[/php]

Both methods simply call the plugin function.

The revised plugin can be downloaded from the original url, here.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s