I am tired to get posts using this multiple tax_query but not working at all. Can anyone fix this problem please? If anyone can fix the problem, I will grateful to him/her forever.
This query get nothing. My query is exactly look like -
$args = array(
'posts_per_page' => 18,
'post_type' => 'post',
'post_status' => 'publish',
'tax_query' => array (
'relation' => 'AND',
array (
'taxonomy' => 'taxonomy-1',
'terms' => array( 2024 ),
'field' => 'term_id',
),
array (
'taxonomy' => 'taxonomy-2',
'terms' => array( 2025, 217 ),
'field' => 'term_id',
),
),
);
$posts = get_posts( $args );