WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Yet Another Related Posts Plugin] Thumbnails of Related Posts

[Resolved] [Plugin: Yet Another Related Posts Plugin] Thumbnails of Related Posts

  • Ben

    @communicatorsinaction

    Howdy,

    I have been attempting to link the post thumbnails with the related posts. I prefer to manipulate the background images with CSS, so I applied a code that strips the html tags from the php code. For that purpose I applied the following:

    <?php
    	$image_id = get_post_thumbnail_id();
       	$image_url = wp_get_attachment_image_src($image_id,'cia_post_thumb_ra_big');
    	$image_url = $image_url[0];
    ?>

    Unfortunately when I apply this as a background-image in my CSS it retrieves the thumbnail source of the post the visitor is reading rather than the thumbnail sources of the related posts. The product of my attempts can be seen here.

    Any help would be appreciated.

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

Viewing 1 replies (of 1 total)
  • Ben

    @communicatorsinaction

    Oops,

    The code I pasted above does indeed work, I just forgot to put it inside of the while loop. Once I did that, everything worked perfectly.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: Yet Another Related Posts Plugin] Thumbnails of Related Posts’ is closed to new replies.