Display a thumbnail based on post images with no additional uploads. For multiple image posts, thumbnail respects Gallery sort order.
<?php ordered_thumbnails(); ?>in your templates within the WordPress post loop.
The plugin takes two optional parameters:
<?php ordered_thumbnails(); ?> behaves exactly like
<?php ordered_thumbnails( 'true', '' ); ?>. Change the 1st parameter to "false" if you want the plugin to return the thumbnail data as an array, rather than display an
<img> for the thumbnail. The 2nd parameter accepts CSS class names you would like to assign to the thumbnail
<img> (only used if param. 1 is "true"). All options will return "false" if no image is attached to the post.
For posts with more than one image attached, you can pick which thumbnail you want to use by ordering the image in the post's gallery. While editing a post, click the "Add an image" button and then click the "Gallery" tab in the lightbox. Re-order your images by dragging the image thumbnail you want to appear for the post to the top of the order. You may also change the order number to "1". Click "Save all changes". See the Screenshots for a visual guide on how to do this. Note that this will NOT reorder images in the actual post.
Using the plugin with
the_excerpt in your
archive.php template works nicely to show thumbnails next to your archived posts.
Requires: 2.5 or higher
Compatible up to: 2.9.2
Last Updated: 2009-6-23
Active Installs: 80+
Got something to say? Need help?