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 made ​​a separate page template (added sidebar), this page contains all the posts. Pagination works! But, if this page set as the home page, pagination is not working! Please help find solutions myself I can not ...

This my code This code of my custom posts page

This code of my pagination

share|improve this question

marked as duplicate by Chip Bennett, toscho Feb 10 '13 at 2:21

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.

    
Never use query_posts. Very likely that's what breaks the pagination. Use WP_Query` instead. When should you use WP_Query vs query_posts() vs get_posts()?. –  Max Yudin Feb 9 '13 at 21:43
    
Please, research this Stack, there are plenty of similar questions. Take a look at this site faq and try to put all necessary code in the Question itself, you are free to edit it whenever needed. –  brasofilo Feb 9 '13 at 21:45
add comment

1 Answer 1

<?php query_posts( array(
 'posts_per_page' => 15,
 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ),
));
?>

It worked for me. You can change the posts_per_page numbers according to whatever you want.

share|improve this answer
    
Unfortunately, it also does not solve the problem :( it works if you do not set the page as the home page. –  Евгений Березовский Feb 10 '13 at 16:13
add comment

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