我理解你这个问题的方式是,无论当前显示的术语是什么,在这个分类法中,每页都需要12篇文章。
这很容易用pre_get_posts. 绝不应更改存档页上自定义查询的主查询。阅读this answer 我最近对这个问题做了一些研究。
使用is_tax() 有条件以分类法页面为目标并查看参数
将此添加到函数。php。您也只能使用一种分类法。php适用于所有术语,无需另外制作50个
function custom_ppp( $query ) {
    if ( !is_admin() && $query->is_tax() && $query->is_main_query() ) {
        $query->set( \'posts_per_page\', \'12\' );
    }
}
add_action( \'pre_get_posts\', \'custom_ppp\' );
EDIT
在分类学中。php,更改此
<?php $loop = new WP_Query( array( \'post_type\' => \'all_products\', \'pre_get_posts\' => 12, \'products\' => \'advance\' ) ); ?> 
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?> 
    //content 
<?php endwhile; ?>
 回到这里
<?php while ( have_posts() ) : the_post(); ?> 
   //content
<?php endwhile; ?>