ID, $tags); ?>
have_posts() && get_option('pyre_related') == 'On'): ?>
Related Posts
have_posts()): $related->the_post(); ?>
//code in functions.php (defines get_related_posts function) :
function get_related_posts($post_id, $tags = array()) {
$query = new WP_Query();
if($tags) {
foreach($tags as $tag) {
$tagsA[] = $tag->term_id;
}
}
$args = wp_parse_args($args, array(
'showposts' => 3,
'post__not_in' => array($post_id),
'tag__in' => $tagsA,
'ignore_sticky_posts' => 1,
));
$query = new WP_Query($args);
return $query;
}