您只需添加cat 或category_name 查询的参数。使用时cat, 您应该使用category ID, 你应该使用category_name, 应该是slug 类别,而不是名称。
改变
<?php $tarali_query = new WP_Query(\'posts_per_page=\'.$nbmax.\'&ignore_sticky_posts=1&paged=\'.$paged); ?>
至
<?php $tarali_query = new WP_Query(\'posts_per_page=\'.$nbmax.\'&cat=CATID&ignore_sticky_posts=1&paged=\'.$paged); ?>
进一步阅读:
WP_Query