WP-LatestPhotos is a WordPress plugin which extends your media library and gives the ability to highlight some of your latest photos. Selected images can be shown in your sidebar—or wherever you need them to be—through the shortcode or inline PHP code.

Features
- Sidebar widget and shortcode support
- Photo randomizer
- Highly customizable through CSS. Plugin provides example CSS which can be used for demo purposes and can be switched off in the plugin settings. This way you can define your own CSS for your thumbnail galleries without being stuck with the excessive styles which most plugins come with, slowing down your website.
- Plugin provides the ability to include Thickbox bundled with your WordPress installation but you also can switch it off and use any other external library. It supports: Thickbox, Fancybox, Lightbox, Shadowbox. If you would like to use any other media viewer you’re should install an appropriate plugin.
- Thumbnails are located in the default image folder and named according to the WordPress convention.
- No performance bottlenecks. Thumbnails are generated only once — when marked.
- AJAXified thumbnail image cache gets rebuilt in case you change thumbnail size in the settings. Re-generating 10 images per request occurs with a little delay, so your server won’t be overloaded and scripts won’t stop working with a timeout error.
Installation
WP-LatestPhotos requires WordPress 2.8 or higher.
- Download and extract the plugin files onto your hard drive
- Copy the extracted folder into your WP plugin directory (usually wp-content/plugins)
- Activate the plugin
Usage
Use WP-LatestPhotos shortcode in your post to add your photos.
Also you can do it using these lines of PHP:
$options = array( 'limit' => 6, 'echo' => 1, 'link' => 'thickbox' ); wp_latestphotos($options);
Options
- limit – number of images to display (6 by default)
- id – you can specify an ID for the unordered list of images
- link – one or more values that determine the URL of where a clicked image takes the user to
Possible values are:
- post_parent – URL of the post to which the image is attached (it works only if image is actually attached, doh)
- attachment – attachment page URL (works only if page is attached to a post)
- full – full-size image URL
- thickbox, fancybox, lightbox or shadowbox – media viewer dependent link
- empty value means no link
You can mix these values up too. For example, you can use a sequence like this: post_parent, thickbox. If an image is attached to some post it uses a link to this post, otherwise it uses a Thickbox-dependent link.
- before, after – additional HTML before and after an IMG tag of each photo
- echo – 0 or 1, automatically outputs generated HTML; useful when applying a function inside PHP templates
Screenshots
Download
Available on the WordPress Plugin Directory.




Hello, I have your WP plugin and When I change the number of photos to 8 photos it only shows 5 and no more than that. How can I get to show more 5 photos? Thanks
i’m having the same problem! i cant figure out how to get it to show more then 5 photos. anyone know the fix??
Hello! Looks like some bug in image randomizer. I’ll check later.
p.s: plugin is updated and tested with WordPress 3.0. Enjoy and thanks for feedback!
my thumbnails are really small and skinny – not box shaped. Is there a setting I am missing? Please advise. Thanks!
@photo, Did you changed thumb size in the plugin settings?
Hi there,
I’ trying to usa the gallery but nothinh happens.
I installed the plugin and inserted the folloqing line in a static page with no result:
<p[WP-LatestPhotos limit="6"][/WP-LatestPhotos]
What’s wrong?
Thank you in advance.
Riccardo Hugony
@Riccardo, the right syntax is: [WP-LatestPhotos limit="6"]
Hello.
I’m trying to install the script in the home not in the sidebar, but I could have followed their suggestions by placing the scrip:
$ Options = array (
‘Limit’ => 6,
‘Echo’ => 1,
‘Link’ => ‘Thickbox’
);
wp_latestphotos ($ options);
…………. But does not work, please help me.
Thank you very much
@luchosar, this is a PHP lines of code which should be placed inside of php file (index.php in your case). Where did you put this lines of code?
Hello.
Try putting them in the index …. What I am is to place the call on the cover, index, or home (body). What is the PHP code for this call?. Thank you.
@luchosar, Hello! The php lines are located under the “Usage” section of this page.
However if you want to place your photos on any page/post so you’d better use a shortcode, just put it into the WordPress editor, for example: [WP-LatestPhotos limit="6"].
ok gracias
if I want a specific category which is the code ..?
—————
si deseo una categoria especifica..cual es el codigo?
Hello ..
Something happens …. I put this code:
$ Options = array (
‘Limit’ => 6,
‘Echo’ => 1,
‘Link’ => ‘Thickbox’
);
wp_latestphotos ($ options );……………. be missing something … do not code, I glue in the index, but I get the images