[wp-trac] [WordPress Trac] #20032: Pagination not working in query_posts
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 13 15:39:42 UTC 2012
#20032: Pagination not working in query_posts
--------------------------+-----------------------------
Reporter: novakpeter | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Types | Version: 3.3.1
Severity: major | Keywords:
--------------------------+-----------------------------
I have this really simple code in my themes category.php before the loop:
{{{
$page = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts(array('post_type'=>array('ai1ec_event'),'paged' => $page));
}}}
(btw, ai1ec_event are posts from All in One Events Calendar plugin).
Posts (type: ai1ec_event) are in the loop, that is OK. Although,
pagination doesnt work.
There is the rendered next_posts_link, after clicking on it, it goes to
URL
{{{
http://www.domain.com/categories/news/events/page/2/
}}}
which is perfectly right. But, it says "Nothing found" and actually shows
homepage.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20032>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list