I really need to get this fixed. Anybody have a clue out there? The backend has four related posts yet more are being posted along with the ones chosen. I am pulling in the posts and then treating it as I would any post so I can customize the output. It worked fine until updating to version 1.8.1. Here is the snippet where I’m pulling in the posts and manipulating the output:
<?php
$ids_manual = wp_parse_id_list( bawmrp_get_related_posts( $post->ID ) );
if(count($ids_manual) > 0 && $isAllowedToView)
{
?>
<div class="contentSection">
<div class="container fixed">
<h3><span>Related Stories</span></h3>
<?php $ids_manual = wp_parse_id_list( bawmrp_get_related_posts( $post->ID ) ); ?>
<ul id="otherArticles" class="clearfix">
<?php
//echo "Number of related is " . count($ids_manual);
foreach($ids_manual as $id)
{
$post = get_post($id);
?>
<li>
<div class="weeklyImage">
<?php $img = get_the_post_thumbnail($post->ID, 'story-medium'); echo '<a href="'.get_permalink().'">';
if(strlen($img) > 0){ echo substr($img, 0, strlen($img)-2) . ' nopin="nopin"/>';
echo '</a>'; } ?>
</div>
<div class="weeklyDate">
<?php
$volumes = get_the_terms($post->ID,'volume');
if($volumes)
foreach($volumes as $volume)
break;
if($volume)
{
$split = explode(' ',$volume->name);
if(intval($split[1]) > 0) $split[1] = convertToString($split[1]);
echo $split[0] . ' ' . $split[1];
}
else
echo date('F j', strtotime($post->post_date));
?> / <?php
$categories = get_the_category($post->ID);
$output = '';
//foreach($categories as $category)
$category = $categories[0];
$output .= '<a href="'.get_category_link( $category->term_id ).'">' . $category->cat_name . '</a>,';
echo trim($output, ',');
?>
</div>
<div class="weeklyTitle">
<a href="<?php echo get_permalink(); ?>"><?php echo get_the_title($post->ID); ?></a>
</div>
<div class="weeklyExcerpt">
<?php echo get_excerpt_by_id($post->ID, true, 30, ''); ?>
<a href="<?php echo get_permalink(); ?>" class="readMore">Read More</a>
</div>
</li>
<?php
}
?>
</ul>
</div>
</div>
<?php
}
?>