0

I've built a plugin that runs on a page & pulls data from a get variable in the URL. Page URIs look like '/page&foo=bar'. That's working perfectly.

I've also built pagination into my plugin, since I have some large datasets outputting. That also works perfectly on it's own.

The problem is that when I have a Get variable in the URL my pagination links don't account for it. Is there a trick to getting an add-on to recognize Get variables in the URL? I can provide some example code if needed, but I suspect there's something obvious I'm missing here.

1 Answer 1

1

There isn't "something obvious" you're missing, as far as I know. I try and maintain the query string in pagination for Low Search, which ended up doing an obtuse regular expression to find/replace URLs without query strings.

Simplest solution is to not automate it, but use something like {pagination_url}?{current_query_string} in your pagination links.

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.