希望这有帮助
$story_type = $_GET[\'type\'];
if ( get_query_var(\'paged\') ) {
$paged = get_query_var(\'paged\');
} elseif ( get_query_var(\'page\') ) {
$paged = get_query_var(\'page\');
} else {
$paged = 1;
}
$alt_query = array (
\'tax_query\' => array(
array(
\'taxonomy\' => \'lot-term\',
\'terms\' => $story_type,
\'field\' => \'slug\',
),
),
\'post-type\' => \'story\',
\'paged\' => $paged
);
query_posts($alt_query);
只是从我最近的作品中复制粘贴。只需将“tax\\u query”更改为您自己的标记查询(&U);“post\\u type”值。