Quick Overview
This is a quick-and-dirty plugin that will grab images from iStockphoto “recently approved” feeds, and put them on the page.
Installation
1. Download this file unzip, and place the php file in /wp-content/plugins/latestistockimages.php in your wordpress folder.
2. Go to the plugins page in the admin system. Click the “Activate” link for this plugin.
3. In your theme, include a call to one (or both!) of the template tags.
Template Tags
There are two functions available for including in templates.
<?php all_latest_istock_images(maximages [, imagesonly]) ?>
If maximages is left blank, then all of the images from the feed will be included.
If imagesonly is true, then the images will display without the descriptions. Each image is wrapped in <div class=”istockimage”> tags, to make it a little easier to use CSS to style the images. If you’re using this parameter, you’ll need to specify maximages.
<?php my_latest_istock_images(userid, maximages [, imagesonly]) ?>
The userid is the numerical user id of the feed to retrieve (In the Control Panel on the iStockphoto site, if you look at the URL given for your RSS feed; this is the number at the end. There is probably an easier way of finding the id, but I’m not sure what it is.)
If maximages is left blank, then all of the images from the feed will be included.
If imagesonly is true, then the images will display without the descriptions. Each image is wrapped in <div class=”istockimage”> tags, to make it a little easier to use CSS to style the images. If you’re using this parameter, you’ll need to specify maximages.
Examples
<?php all_latest_istock_images() ?>
displays all of the images (currently 10) from the RSS feed of all recently approved images.
<?php all_latest_istock_images(3) ?>
or <?php all_latest_istock_images(3, false) ?>
displays the three most recently approved images with their descriptions; from the RSS feed of all recently approved images.
<?php all_latest_istock_images(10,true) ?>
displays images only for the ten most recently approved images from the RSS feed of all recently approved images.
<?php my_latest_istock_images("183642") ?>
displays all of the images (currently 10) from the RSS feed of my recently approved images (Remember to replace my ID with your ID to display your images instead)
<?php my_latest_istock_images("183642", 3) ?>
or <?php my_latest_istock_images("183642", 3, false) ?>
displays the three most recently approved images from the RSS feed of my recently approved images (Remember to replace my ID with your ID to display your images instead)
<?php my_latest_istock_images("183642", 10, true) ?>
displays images for the ten most recently approved images from the RSS feed of my recently approved images (Remember to replace my ID with your ID to display your images instead)
The Output…
If the descriptions are included:
And for images only:
Lastly..
If you have any questions, leave a comment here and I’ll see how I can help (:
Oh yeah! My iStockphoto portfolio lives here: http://www.istockphoto.com/file_search.php?action=file&userID=183642. Go buy a million photos, so that one day I might make it to the threshold where I can cash out (;