Php 如何将语言参数设置为WP_查询

Php 如何将语言参数设置为WP_查询,php,wordpress,Php,Wordpress,如何在WP\u query中为筛选语言设置语言参数? “抑制过滤器”=>0不工作 $query = new WP_Query(array( 'post_type' => 'apre_restaurants', 'posts_per_page' => -1, 'post_status' => 'publish' )); 试试下面的脚本 $args = array( 'posts_per_page' => -1, 'tax_query' =>

如何在
WP\u query
中为筛选语言设置语言参数?
“抑制过滤器”=>0
不工作

$query = new WP_Query(array(
    'post_type' => 'apre_restaurants',
    'posts_per_page' => -1,
    'post_status' => 'publish'
));
试试下面的脚本

$args = array( 'posts_per_page' => -1, 'tax_query' => array( array( 'taxonomy' => 'include custom taxonomy name', 'field' => 'id', 'terms' => function_exists('icl_object_id')?icl_object_id($categoryID,'include custom taxonomy name',false):$categoryID ) ), 'suppress_filters' => 0 ); //(do not forget 'suppress_filters' => 0) :)
试试下面的脚本

$args = array( 'posts_per_page' => -1, 'tax_query' => array( array( 'taxonomy' => 'include custom taxonomy name', 'field' => 'id', 'terms' => function_exists('icl_object_id')?icl_object_id($categoryID,'include custom taxonomy name',false):$categoryID ) ), 'suppress_filters' => 0 ); //(do not forget 'suppress_filters' => 0) :)
$artists=new WP_Query('post_type=artist&orderby=rand&posts_per_page=9&suppress_filters=1')$美术师=新的WP_查询('post_类型=美术师&订购者=兰德&每_页面发布_=9&抑制_过滤器=1');