2013-09-25 70 views
1

我需要得到與分類學的孩子交的職位,所以我有發送以下參數wp_query但不返回任何東西,我沒有得到任何錯誤,Wordpress獲得post_child和tax_query的子帖子?

$args = array('post_type' => 'event','post_child'=>'location', 
       'tax_query' => array(
       array(
       'taxonomy' => 'kind_of_location', 
       'field' => 'slug', 
       'terms' => 'restuarant' 
       ) 
       ) 
       ); 
$my_query = new WP_Query($args); 

是什麼問題這裏?以及我如何獲得與我的子女職位分類標準相關的職位?

+0

我繼續讀你想什麼做的,我沒有得到它。你能更精確地解釋一下嗎? 您是否嘗試過「位置」 – Eduplessis

+0

是的,與子女崗位'location'的稅務查詢 – kan

回答

0

所以,如果你想要的位置的孩子你的參數post_parent而不是post_child

+0

否,我的分類術語名稱是'restuarant' – kan