Forums

[resolved] Simple Post Thumbnails USAGE CODE (3 posts)

  1. intricateartist
    Member
    Posted 3 months ago #

    <img alt="<?php the_title(); ?>" src="<?php echo p75GetThumbnail($post->ID, null, null); ?>" border="0" />

    http://wordpress.org/extend/plugins/simple-post-thumbnails/

  2. GlobalFlyer
    Member
    Posted 2 months ago #

    That's great. Now, how do I add the

    if ( p75HasThumbnail($post->ID) ) {
    		p75GetOriginalImage($post->ID);
    	}

    Variable to that?

  3. GlobalFlyer
    Member
    Posted 2 months ago #

    Never mind. I figured it out:

    <img alt="" src="<?php if ( p75HasThumbnail($post->ID) ) { echo p75GetThumbnail($post->ID, 150, 150); } ; ?>" style="float:left;margin:0 5px 0 0;" border="0" />

    This will return an image only if there is one and resizes the thumbnail to 150x150. I also took out the alt because it looked weird when there wasn't a thumbnail having the title below the title.

Reply

You must log in to post.

About this Topic