开发者

How to do pagination on a Wordpress "Page"

开发者 https://www.devze.com 2023-01-21 20:43 出处:网络
I have seen th开发者_如何学Pythonis function call get_query_var(\'paged\') work in other places

I have seen th开发者_如何学Pythonis function call get_query_var('paged') work in other places

my page is /news/page/2

But get_query_var('paged') is allways returning 0.

What gives?

Thanks!


My problem was I called query_posts('posts_per_page=5'); that reset the query value of paged.

If I called get_query_var('paged') before query_posts('posts_per_page=5'); it works.

0

精彩评论

暂无评论...
验证码 换一张
取 消