我已经解决了
供上一次/下次使用Ambrosite Next/Previous Post Link Plus
要获取当前/全部,请在循环中使用以下代码
$query = new WP_Query( array(
\'post_type\' => \'works\',
\'post_status\' => \'publish\',
\'posts_per_page\' => \'-1\',
\'tax_query\' => array(
array(
\'taxonomy\' => \'work_category\',
\'field\' => \'slug\',
\'terms\' => \'design\'
)
),
\'order\' => \'ASC\'
) );
$all = $query->post_count;
foreach( $query->posts as $key => $p )
if( $post->ID == $p->ID ) $current = $key + 1;
echo $current.\'/\'.$all;