8, 'post_class' => "av_one_eighth no_margin ", 'image_size' => 'square', 'tooltip' => true, 'title_short'=> false ); if($rp == "av-related-style-full") { $avia_config['related_posts_config'] = array( 'columns' => 6, 'post_class' => "av_one_half no_margin ", 'image_size' => 'square', 'tooltip' => false, 'title_short'=> true ); } } if($rp == "disabled") return; extract($avia_config['related_posts_config']); $is_portfolio = false; //avia_is_portfolio_single(); $related_posts = false; $this_id = $post->ID; $slidecount = 0; $postcount = ($columns * 1); $format = ""; $fake_image = ""; $tags = wp_get_post_tags($this_id); if (!empty($tags) && is_array($tags)) { $tag_ids = array(); foreach ($tags as $tag ) { if($tag->slug != "portrait" && $tag->slug != "landscape") { $tag_ids[] = (int)$tag->term_id; } } if(!empty($tag_ids)) { $my_query = get_posts( array( 'tag__in' => $tag_ids, 'post_type' => get_post_type($this_id), 'showposts'=>$postcount, 'ignore_sticky_posts'=>1, 'orderby'=>'rand', 'post__not_in' => array($this_id)) ); if (!empty($my_query)) { $extra = 'alpha'; $count = 1; $output = ""; //create seperator $output .= ""; $output = str_replace("{image}",$fake_image,$output); if($related_posts) echo $output; } wp_reset_query(); } }