Thread Starter
bhang
(@bhang)
<?php $related_posts = MRP_get_related_posts( $post->ID );
if(!empty($related_posts)) {
foreach($related_posts as $key => $value) {
$related_post = get_post($key);
echo "<div class='pic_column'>";
echo "<img src='";
echo p75GetThumbnail($related_post->ID);
echo "' />";
echo "</div>";
echo "<h6>";
echo "$related_post->post_title";
echo "</h6>";
echo "<p>";
echo the_excerpt($related_post->ID);
echo "</p>";
}
}?>
im using this code..i can get the thumbnail but for execrpt still not working..
any help? thanks
Thread Starter
bhang
(@bhang)
anyone?? any help would be great :)thanks
Thread Starter
bhang
(@bhang)
the exercpt still show the main post’s excerpt..not the related one
can anyone tell me to fix this..
thanks in advance
Thread Starter
bhang
(@bhang)
OK i already found it..hahaha
<?php $related_posts = MRP_get_related_posts( $post->ID );
if(!empty($related_posts)) {
foreach($related_posts as $key => $value) {
$related_post = get_post($key);
echo "<div class='pic_column'>";
echo "<img src='";
echo p75GetThumbnail($related_post->ID);
echo "' />";
echo "</div>";
echo "<h6>";
echo "$related_post->post_title";
echo "</h6>";
echo "<p>";
echo "$related_post->post_content";
echo "</p>";
}
}?>
but now i need to show the category..can anyone help? thanks in advance
Thread Starter
bhang
(@bhang)
OK got it..
<?php $related_posts = MRP_get_related_posts( $post->ID );
if(!empty($related_posts)) {
foreach($related_posts as $key => $value) {
$related_post = get_post($key);$category = get_the_category() ;
$category = get_the_category($related_post->ID);
echo $category[0]->cat_name;
echo "<div class='pic_column'>";
echo "<a href='";
echo get_permalink($related_post->ID);
echo "'><img src='";
echo p75GetThumbnail($related_post->ID);
echo "' /></a>";
echo "</div>";
echo "<h6>";
echo "$related_post->post_title";
echo "</h6>";
echo "<p>";
echo "$related_post->post_content";
echo "</p>";
}
}?>