how display related posts first by tags then by categories?
this is my code:
$q = new WP_Query( array( 'posts_per_page'=>3, 'tag__in'=>$post_tags, 'category__in'=>$post_categories, 'post__not_in'=>array(get_the_id()) ) );
i want display related posts based tags and then if there is no posts based on tags, then displayed based on categories!
there is some way to do this?