Trying to display common posts from multiple post categories using WP_Query and category__and. Following is the query:
$query = array( 'category__and' => array( 'cat-1', 'cat-2'), 'posts_per_page' => 10, 'paged' => $paged ); $cat_query = new WP_Query($query);
Now in the above case the posts are correctly fetched but the sticky posts are not displayed first.
Following code solves the problem but it doesn't perform "and" of the categories posts.
$query = array( 'cat' => array( 'cat-1', 'cat-2'), 'posts_per_page' => 10, 'paged' => $paged );
The above query displays the sticky posts first but doesn't perform "and" on category posts.
Is there any way to satisfy the condition of sticky posts first and common posts from multiple categories?