0
我創建自定義帖子類型命名爲「Syllabi檔案」,並添加了自定義分類學命名爲「程序,學年和學期」,現在我希望通過分類法過濾帖子,如圖像WordPress的,如何通過自定義帖子類型的分類過濾
我創建自定義帖子類型命名爲「Syllabi檔案」,並添加了自定義分類學命名爲「程序,學年和學期」,現在我希望通過分類法過濾帖子,如圖像WordPress的,如何通過自定義帖子類型的分類過濾
我想你需要的東西是這樣的:
query_posts(array(
'post_type' => 'Syllabi Archive', // name without spaces
'posts_per_page' => -1, // show to all posts
'tax_query' => array(
array(
'taxonomy' => 'Program, Academic Year and Semester', //or tag or custom taxonomy without spaces
'field' => 'id',
)
)
));