web statistics

How to Show First Image In Post as Thumbnail In Wordpress Blog

Posted on July 6th, 2009 under Plugins, WordPress
ADVERTISMENTS
Share |

I’ve shared a plugin called Thumbnail For Excerps that let you show thumbnails in your blog’s homepage using wordpress blogging platform.Here’s Attached Image WP plugin that will automatically show the first image in your post as a thumbnail image in your blogs homepage with more control on how the images look and easier to manage.

  • It can show the full, medium or thumbnail sized image attached to the current post.
  • It can make a hyperlink around the image that points to the post the image is attached to, the full image, the attachment page or a custom URL using custom fields on a post by post basis.
  • If more than one image is attached to a post then the image to be shown can be changed using the WordPress gallery page. Just pull the image you wish to show right to the top of the list and press save.

The plugins options page makes it easy to customize how the plugin works.Just call the plugin function within the loop.

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
      	<!-- Some HTML will be here –>
<?php the_attached_image(); ?> /*Insert this code preferably after the the_title() function*/
<?php endwhile; ?>
<?php endif; ?>

You can also pass parameters,like this

<?php the_attached_image('img_size=thumb&css_class=hpimg'); ?>

You can set more options right from the Plugins Options Page, that will be available after activating the plugin.

the-attached-image-options

The added advantage with this plugins is that in case you have been using Custom Fields With your current theme, you can also call the images set using custom fields using the plugin.

You can also choose to show the nth as the thumbnail using the Pick Functionality from the options theme, you can enable this by checking the Pick Functionality box and providing a number (n), the plugin will instead use the nth numbered image tag from the post content as the thumbnail.

You can also have multiple instances of the function call by passing parameters.You can also pass the parameters of the options available through the plugins options page, Check out the list of supported parameters here.

Download The Attached Image Plugin | Plugin Documentation

Written by Avinash

Browse Tech Yard for the latest & interesting web applications, Freewares, Wordpress Tips, Firefox Hacks and Addons, Mobile Phones, Windows - Linux - MAC OS Tricks.

Stumble Digg Technorati Reddit Delicious


Related Posts

Leave a Reply

Subscribe to TECH YARD:

RSS

Grab the RSS feed for Free Updates!


subscribe

Get blog updates sent directly to your inbox by entering your email address above.



Recent Comments

Hi, thanks for the post, I am trying to modify this plugin to work on my sl...
It does not work with windows 7 please help...
I want to be able to pick and choose which applications are fetched during ...
hi this is good antiviruas soft...
Where can I find those input files? It doesn't say anywhere....
Very nice! Works exactly as described. Thank you!...
do you have any idea abt price???????...
Before I got my reliance connection, I have to search daily for free sms si...
I think we can find the Mobile operator using various online services also....
These all themes come for fre.. :O OMG this is hard to believe.. Thanks for...