term_id; } $args = array( 'tag__in' => $tag_ids, 'post__not_in' => array(get_the_ID()), 'posts_per_page' => $posts_count, 'post_status' => 'publish', 'ignore_sticky_posts' => 1 ); $osetin_query = new WP_Query( $args ); if (!$osetin_query->have_posts()){ wp_reset_postdata(); $args = array( 'post__not_in' => array(get_the_ID()), 'posts_per_page' => $posts_count, 'post_status' => 'publish', 'ignore_sticky_posts' => 1 ); $osetin_query = new WP_Query( $args ); } if ($osetin_query->have_posts()){ while ($osetin_query->have_posts()){ $osetin_query->the_post(); ?>

array(get_the_ID()), 'posts_per_page' => 4, 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'orderby' => 'post_date', 'order' => 'DESC', ); $recent_posts_query = new WP_Query( $args ); if ($recent_posts_query->have_posts()){ ?>

have_posts()){ $recent_posts_query->the_post(); $feat_image_url = wp_get_attachment_url( get_post_thumbnail_id() ); ?>
'; } wp_reset_postdata(); ?>