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.

I have a Page, with Custom Page Template to display 6 "Posts" with a specific category on that page.

The Code that i have used can be found here: http://pastebin.com/E52u0TTi

Also, i have tried:

But Both show same posts and not other posts, however the URL changes to page/1/ page/2 and so on.

What do i intend to have:

I want to have Next link to be displayed on the template and when it is clicked, the next set of Posts with same Category should load.

I tried to google for a solution can stumbled upon this post: http://blog.deconcept.com/2005/02/07/wordpress-next-previous-post-links/ the solution used here is deprecated.

Kindly help.

share|improve this question

1 Answer 1

It looks like you're missing the "$paged" variable. This controls the pagination, along with the "posts_per_page" option you have set.

Please see the following amended PasteBin: http://pastebin.com/U4teTA0F

This ensures that the correct page is set when using "/page/2". "/page/3", etc.

share|improve this answer
    
Please do not hide essential code on external web sites. Add it to your answer. –  toscho Nov 28 '12 at 10:57
    
Hey @Matty Thanks a lot for the change. Now its working perfectly. Indeed .paged was essential. Ill make sure to add full code henceforth, was under impression that rules here are similar to that of Wordpress.org forums. –  SNaushadS Nov 28 '12 at 12:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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