Home Forums Fashionic WordPress Theme Related posts Reply To: Related posts



Thanks, after some puzzling I found a way. I had trouble with the javascript in PHP. Here is the code I finally used in combination with the Related Posts plugin of WordPress. You can see it in action on the previous link.

$post_id_related = $related_post->ID;

$onclick = “jQuery”;
$onclick .= “(‘li[postid=”;
$onclick .= $post_id_related;
$onclick .= “] a’).trigger(‘click’);return false;”;

$img = wp_rp_get_post_thumbnail_img($related_post, $image_size);
if ($img) {
$output .= ‘‘ . $img . ‘‘;