Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This question already has an answer here:

I can't get pagination inside categories listings to work.

I'm using a custom query, with the get_query_var('paged'):

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args=array(
'post__not_in'=>$essentielle_excluded_posts,
'category_name' => 'concours-fun',
'paged'=>$paged, 
'posts_per_page'=>5,
);
query_posts($args);

Also tried the Category Pagination Fix plugin.

My permalink structure: /%category%/%postname%-%post_id%.html

Example of the error: http://www.essentielle.be/concours-fun/page/2

Any idea as to what else i should check?

share|improve this question

marked as duplicate by Chip Bennett, kaiser, t f, brasofilo, Johannes Pille Oct 31 '13 at 14:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 3 down vote accepted

get_query_var('paged') should be get_query_var('page'), however, you should use a pre_get_posts action hook to alter the query rather than using query_posts in the template, which is a waste of resources (see this answer for more info).

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.