尝试创建WP\\u Query的新实例,并最终使用WP\\u reset\\u Query();像这样:
<?php
$my_query = new WP_Query();
$paged = (get_query_var(\'paged\')) ? get_query_var(\'paged\') : 1;
$my_query->query(\'cat=\'. $id .\'&posts_per_page=4&paged=\'.$paged);
while ($my_query->have_posts()) : $my_query->the_post();
?>
<?php get_the_content() ?>
<?php endwhile; ?>
<?php if ( $my_query->max_num_pages > 1 ) : ?>
<?php previous_posts_link( __( \'Previous\', \'themename\' ) ); ?>
<?php next_posts_link( __( \'Next\', \'themename\' ) ); ?>
<?php endif; ?>
<?php wp_reset_query(); ?>