WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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



share|improve this answer
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? – drtanz 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 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.