WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. intricateartist
    Member
    Posted 4 years 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. Paul Tocknell
    Member
    Posted 4 years ago #

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

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

    Variable to that?

  3. Paul Tocknell
    Member
    Posted 4 years 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.

  4. vegasrenie
    Member
    Posted 4 years ago #

    which file does this go into? timthumb or thumbnail-poster?

  5. Treebeard
    Member
    Posted 4 years ago #

    YES!! Finally a simple way to add the thumb if there is one. I couldn't get the code on their site to work with my other plugins. Thanks GlobalFlyer!

  6. obuzz
    Member
    Posted 4 years ago #

    Please, help me !!!

    On Which file i should put the code:

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

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

    ???????

    I'm new on wordpress =( !

  7. furyeffect
    Member
    Posted 4 years ago #

    Please help. I'm having the same problem.

    I don't know where to go/which file/how to add the lines per this instruction:

    4. Add the p75GetThumbnail(int $postID, [int $width, [int $height, [string $fileType]]]) function to your theme to get the URL of a thumbnail and p75GetOriginalImage(int $postID) to get the URL to the original image.

    Thank you.

  8. tommydamani
    Member
    Posted 3 years ago #

    come on guys you come here for help but once you found the help and fixed your own problem you disappear.. not a good team spirit

    please tell us how to insert this code? my thumbs are not showing up on the Press75 Video Elements theme v. 1.5 posts!!

    The images are showing up with the 'related videos' but not on the home page!

    How do we fix?

Topic Closed

This topic has been closed to new replies.

About this Topic