• Resolved bhang

    (@bhang)


    Can anyone help me to display excerpt and thumbnail with this plugin..
    thanks in advance
    anyhelp would be great

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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)

    anyone…?

    Thread Starter bhang

    (@bhang)

    anyone..? thanks

    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>";
    					}
    					}?>

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘microkid related post’ is closed to new replies.