In post related posts widget

Joined
Mar 27, 2015
Messages
837
Likes
1,486
Degree
3
Anyone know of one that does this kind of thing for wordpress - taken from DailyMail. All the related posts plugins I have found have been for sidebar or footer only but as we all know - all the clicks happen in the body of the post.

http://screencast.com/t/aVI3c901s
 
You can do that with Content.Ad, just create a widget that shows only your own posts. Then place within your post. If you want to do it sitewide, it's easiest if you have an ad inserter plugin (I use AdInserter) and place the Content.Ad code within it.

Another option is Yuzo related posts. Pretty much same thing.
 
Nice! never seen that functionality in content ad before will check out. Ty
 
If you're comfortable getting into your theme files, you can use the following code in your single.php to get a selection of random posts that share the same tags as your current post:

Code:
<!--Start Related Posts-->
<?php
$orig_post = $post;
global $post;
$tags = wp_get_post_tags($post->ID);

if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
'tag__in' => $tag_ids,
'post__not_in' => array($post->ID),
'posts_per_page'=>6, // Number of related posts to display.
'orderby' => 'rand',
'caller_get_posts'=>1
);

$my_query = new wp_query( $args );

while( $my_query->have_posts() ) {
$my_query->the_post();
?>

<a href="<? the_permalink()?>"><?php the_post_thumbnail('medium'); ?><br />
<?php the_title(); ?></a>


<? }
}
$post = $orig_post;
wp_reset_query();
?>
</div>
<!--End Related Posts-->
 
Back