2
pre_get_posts 필터에서 $ query-> set ( 'tax_query'를 사용하는 방법이 있습니까?
사용하는 방법 프로그래머 $query->set('tax_query', ...)의 pre_get_posts필터를? 예를 들어 다음 코드는 쿼리를 변경하지 않습니다. 나는 $ taxonomies 및 사용자 정의 검색을 작성하고 있습니다. function custom_search_filter($query) { ... // array('taxonomy' => 'category', 'field' => 'id', 'terms' => array( 41,42 ), 'operator' => 'IN') $taxonomies = implode(',', $taxonomy_arr); // /wordpress/25076/how-to-filter-wordpress-search-excluding-post-in-some-custom-taxonomies $taxonomy_query = array('relation' …