0

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?

1 Answer 1

1

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

http://css-tricks.com/snippets/wordpress/paginate-custom-post-types/

http://wordpress.org/support/topic/custom-post-type-taxonomy-pagination?replies=14

4
  • 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, 2012 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. Aug 28, 2012 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, 2013 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. Mar 13, 2013 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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