Wordpress: Pagination displays the same content on each page

888u

Last update at :2024-07-06,Edit by888u

When I checked the website today, I found that all paginated pages in one category displayed the same content, while other pages were normal. The solution is to add the following parameters to the paging code:

'paged' => get_query_var( 'paged' ),

The final paging code is as follows:

$cat, 'post__not_in' => get_option( 'sticky_posts' ) , 'posts_per_page' => 10, 'paged' => get_query_var( 'paged' ), ); $query = new WP_Query( $args ); while ( $query->have_posts() ) : $query->the_post(); ?>
3, 'prev_text' =>'<', 'next_text' =>'>') ); ?>

Recommended site searches: Taiwan server rental, ws domain name, icp registration query, Hong Kong vps, private server rental, query ip, US multi-ip station group vps, US server rental website, rent a server, mainland China registration-free server,

Wordpress: Pagination displays the same content on each page

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码