WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WordPress Related Posts] Thumbs not showing (3 posts)

  1. tuuni
    Member
    Posted 4 years ago #

    The thumbnails are not showing in posts..

    in code it shows just like <img src="" >

    I tried all the custom field for thumbs, but still no image.

    http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin/

  2. stephenjames716
    Member
    Posted 3 years ago #

    I'm having the same issue, did you ever get it resolved?

    thank you.

  3. dr.brems
    Member
    Posted 3 years ago #

    open the plugin file: "wp_related_posts.php" and search for:

    $related_posts as $related_post

    and replace:

    if ($wp_rp["wp_rp_thumbnail"]){
    			$output .=  '<a href="'.get_permalink($related_post->ID).'" title="'.wptexturize($related_post->post_title).'"><img src="'.get_post_meta($related_post->ID, $wp_rp["wp_rp_thumbnail_post_meta"], true).'" alt="'.wptexturize($related_post->post_title).'" /></a>';
    		}

    with:

    if ($wp_rp["wp_rp_thumbnail"]){
    			$article_thumbnail = wp_get_attachment_image_src ( get_post_thumbnail_id ( $related_post->ID ), 'product_preview');
    			$output .=  '<a href="'.get_permalink($related_post->ID).'" title="'.wptexturize($related_post->post_title).'"><img src="'.$article_thumbnail[0].'" width="'.$article_thumbnail[1].'" height="'.$article_thumbnail[2].'" alt="'.wptexturize($related_post->post_title).'" /></a>';
    		}

    now the plugin uses the article thumbnail..

    cheers Dr.Brems

Topic Closed

This topic has been closed to new replies.

About this Topic