'post', 'post_status' => 'publish', 'posts_per_page' => $amount, 'ignore_sticky_posts' => true, 'post__not_in' => array($post->ID), 'orderby' => 'rand' ); $grid = get_theme_mod('airinblog_cus_post_related_grid', 'r4'); if (get_theme_mod('airinblog_cus_lay_all', 'right') !== 'no_sidebar_full') { switch ($grid) { case 'r4': $img_size = '195x110'; break; case 'r5': $img_size = '155x87'; break; case 'r3': $img_size = '270x152'; break; } } else { switch ($grid) { case 'r4': $img_size = '270x152'; break; case 'r5': $img_size = '215x121'; break; case 'r3': $img_size = '378x213'; break; } } if ($related_tax == 'cat') { $cats = get_the_category($post->ID); if ($cats) { $c = array(); foreach ($cats as $cat) { $c[] = $cat->term_id; } $args['category__in'] = $c; $q = new WP_Query($args); if ($q->have_posts()) { ?> have_posts()) { $q->the_post(); ?> > ', ''); ?> ID); if ($tags) { $t = array(); foreach ($tags as $tag) { $t[] = $tag->term_id; } $args['tag__in'] = $t; $q = new WP_Query($args); if ($q->have_posts()) { ?> have_posts()) { $q->the_post(); ?> > ', ''); ?>