我想做的是看看是否在一个页面上发布了选择了两个猫的帖子(他们必须同时选择两个猫才能显示,而不仅仅是一个猫)
if (is_page(15) || $post->post_parent=="15") {
$option1 = \'11, 4\';
$option2 = \'11, 7\';}
<?php $my_query_args = array(
\'posts_per_page\' => 10,
\'meta_key\' => \'price\',
\'meta_value_num\' => \'\',
\'orderby\' => \'meta_value_num\',
\'order\' => \'asc\',
\'tax_query\' => array(
array(
\'taxonomy\' => \'category\',
\'field\' => \'id\',
\'terms\' => array( $inventory_home ),
\'operator\' => \'AND\'
)
)
);
$my_query = new WP_Query( $my_query_args );?>