Can anyone help me to display excerpt and thumbnail with this plugin..
thanks in advance
anyhelp would be great
Can anyone help me to display excerpt and thumbnail with this plugin..
thanks in advance
anyhelp would be great
<?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
anyone?? any help would be great :)thanks
the exercpt still show the main post's excerpt..not the related one
can anyone tell me to fix this..
thanks in advance
anyone...?
anyone..? thanks
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
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>";
}
}?>This topic has been closed to new replies.