Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter andyaa

    (@andyaa)

    The code got a little messed up

    Here it is again

    <?php if ( p75HasThumbnail($post->ID) ) { ?><img src="<?php echo p75GetThumbnail($post->ID, 215, auto); ?>" alt="<?php the_title(); ?>" class="thumb" /><?php } ?>

    Been trying to figure out this one with no luck.

    This thumbnail plugin seems to use custom fields to retrieve the right image from each post but for some reason can’t get it to work on my blog. Even tried to reach the plugin’s documentation page but the domain name seems to have expired or something, so no luck there either.

    Maybe this can help you get started:

    Change:

    `if ($instance[‘thumbnail’][‘active’] && $this->thumb ) {
    // WPP original code here
    }`

    … into:

    if ($instance[‘thumbnail’][‘active’] && $this->thumb ) {
    if ( p75HasThumbnail($wppost->ID) ) {
    $thumb = ‘<img src=”‘. p75GetThumbnail($wppost->ID, 215, auto) .'” alt=”‘. get_the_title($wppost->ID) .'” class=”thumb” />’;
    } else {
    $thumb = ”;
    }
    }

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WordPress Popular Posts] Adding attached image to thumbnail’ is closed to new replies.