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.

  • What browser are you using? Commented Sep 15, 2011 at 13:08

1 Answer 1


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')));

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.