Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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:

http://mysite.com/news/?type=My+Variable

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:

http://mysite.com/news/page/2/?type=MyVariable

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
add comment

1 Answer

up vote 1 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
add comment

Your Answer

 
discard

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.