'ids') );
//query arguments
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 3,
'orderby' => 'rand',
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'id',
'terms' => $anews_related_texonomy
)
),
'post__not_in' => array (get_the_ID()),
);
//the query
$anews_PrelatedPosts = new WP_Query( $args );
if($anews_PrelatedPosts->have_posts()) :
while($anews_PrelatedPosts->have_posts()) : $anews_PrelatedPosts->the_post();
?>