我通过此查询得到一条未定义的偏移量消息。有人能帮忙吗?
$terms = get_the_terms( $post->ID , \'filters\', \'string\');
$term_ids = wp_list_pluck($terms,\'term_id\');
$second_query = new WP_Query( array(
\'post_type\' => \'portfolio\',
\'tax_query\' => array(
array(
\'taxonomy\' => \'filters\',
\'field\' => \'id\',
\'terms\' => $term_ids,
\'operator\'=> \'IN\' //Or \'AND\' or \'NOT IN\'
)),
\'posts_per_page\' => 4,
\'ignore_sticky_posts\' => 1,
\'orderby\' => \'date\', // \'rand\' for random order
\'post__not_in\'=>array($post->ID)
) );