JB_YahooPics
JB_YahooPics is a plugin that allows you to easily show pictures in your blog posts related to your blog posts. Add a few simples lines of code into your blog template (single.php or even sidebar.php) and your off and going. Pictures are downloaded using Yahoo’s picture API and gets pictures based on a keyword that you define. I personally use the Custom Fields that Wordpress provides.
Check out this demo page. In this post my keywords for this post are “Quanta Plus KDE” and it’s showing pictures related to those keywords.
Instructions:
1. Download the plugin here:
2. Unzip the zip file in your Wordpress plugins folder (wp-content/plugins).
3. Goto your plugins admin page in your blog dashboard and activate the plugin.
4. Open up your blog template (single.php) and add this code a few lines below “the_content()” line. Replace the “some keyword” with a keyword for pictures you want to show.
<?php echo yahooPicsShow("some keyword","0","8"); ?>
If you want to show pictures related to each blog post follow the instructions below.
When adding or editing a post or page in wordpress, add a Custom Field with a name of “YahooPicKeyword” and for the value, enter the keyword for the pictures you wish to display. In the case you see here I have entered “Mountain Pictures” (without quotes mind you…).

Save your post.
Now open up your blog template again (single.php) and add the following lines of code just under the “tjhe_content()” line…
<?php
$ypKeyword = get_post_meta( $post->ID, "YahooPicsKeyword", true);
if ($ypKeyword != "")
{
echo yahooPicsShow($ypKeyword,"0","8");
}
?>
If you want to show a single picture use this code:
<?php
$ypKeyword = get_post_meta( $post->ID, "YahooPicsKeyword", true);
if ($ypKeyword != "")
{
echo yahooPicsShow($ypKeyword,"1"); //<- this is the line that changed. We changed the 0 to a 1.
}
?>
You can also put this code in your sidebar.php template.

