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

I'm having a problem with wordpress rewriting my URLs, basically I have a regular search form with method set as GET, when I submit it the URL looks like this at first:


Wordpress adds the + symbol to separate the string and the results show fine, but when I click on the previous posts link the URL changes to:


Since the type parameter is now MyVariable it shows me no results, it doesn't matter if I type the + sign directly in the URL, when I press ENTER it just gets removed.

It seems to be related to how wordpress handles canonical URLs but I'm not sure about it, can anyone help me?

Thanks in advance.

share|improve this question
What browser are you using? – Brian Fegter Sep 15 '11 at 13:08
up vote 3 down vote accepted

I don't think this will solve your problem, but take a look at url_encode().

$pagination['add_args'] = array('s'=>urlencode(get_query_var('s')));
share|improve this answer

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.