Skip to content

Pagination support on mapped archives

If you are mapping a URL to an archive page, you may need to support pagination. You can do this by enabling the Support Pagination checkbox within the Resource field when mapping to a resource.

Enabling this option will make paged URLs — e.g; http://domain.com/your/url/page/3 — accessible on the mapped domain and will offset the posts to suit the requested page number.

When is this option available?

The option will only be available when mapping to a resource and the resource type is one of:

  • Post type archive
  • Taxonomy term archive

Does this work on root and fallback mappings?

Yes, this will work on any type of mapping that supports pagination.

Issues/caveats to be aware of

  1. In version 1.1, the plugin assumes the default pagination permalink structure — e.g; page/?([0-9]{1,}) — is in use. If you have customised the pagination permastruct in some way, the pagination won't work as expected. Please let us know if this is the case as we do intend to implement more robust pagination handling.
  2. The pagination rewrite endpoint is always at the end of a URL so if you are using RegEx in your mapped URL and are using a capturing group — e.g: (…) — within your RegEx pattern, the pagination portion of the URL won't be in the correct index which is currently assumed as position 1. If you are in this situation, consider using a non-capturing group instead. Unfortunately, WordPress doesn't support named capture groups at this time.