WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#20032 closed defect (bug) (invalid)

Pagination not working in query_posts

Reported by: novakpeter Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.1
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

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.

Change History (2)

comment:1 helenyhou2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Severity changed from major to normal
  • Status changed from new to closed

Exact duplicate of #19985. Also, this is still a support issue, not a bug. Try the WordPress.org forums or the #wordpress channel in IRC instead.

comment:2 thee172 years ago

Related #14370

Note: See TracTickets for help on using tickets.