Hi I have a custom post type and its posts are called via a shortcode on any other post or page.

I'd like to paginate this post type, say display 10 items. So the page in the URL remains the same, but the content inside (via shortcode) changes when I go to the 2nd page from the pagination buttons.

How do I do this?


Try to do a little research. This is documented all over the googlesphere.



  • So since the query is being run inside a particular post or page, would pagination still work leaving the rest of the page unaffected and using the same URL? – urok93 Aug 26 '12 at 21:48
  • @drtanz You would probably want to pass the argument for what page you are on, whether that's through $_GET or $_POST is entirely up to you. I'd suggest GET. To do that, check out add_query_arg to add the argument. You would check for that variable being passed where you render your shortcode. – Eric Holmes Aug 28 '12 at 20:31
  • Link only answers are considered poor quality. Please explain why those posts are useful and how to achieve it. Thanks. – kaiser Mar 13 '13 at 14:43
  • This resolved ticket is 7 months old, I don't see how it's relevant any longer. People should do ample research before posting a question here, anyways. The answer is clearly explained in those links - they aren't just to Codex pages. – Eric Holmes Mar 13 '13 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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