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
<form class="search-form" action="<?php echo home_url( '/suche/' ); ?>" method="get">

    <input type="text" name="s" class="s" value="<?php the_search_query(); ?>" />

this is in my searchform.php template.

Any ideas why when searching for e.g. "Graphic Design" it searches for "Cool%20Car" and replaces the space with an encoded %20?

This of course doesn't return any results because there is no text as "Cool%20Car" on my blog.

Any idea how to fix that?

share|improve this question
You could change the 'method' to POST... – Tomas Buteler Oct 12 '12 at 0:55

This happens because search strings gets url encoded in order for the URL to be valid. You can reverse this with urldecode.

share|improve this answer
But this seems weird. Has never happened to me on other Wordpress Sites I made. Or at least it worked with the search terms. In my case the search.php holds Cool%20Car as term and not Cool Car as it's supposed to. I know the url must be encoded but why are the terms on my search.php site still encoded? – mathiregister Oct 6 '12 at 14:54
As usual - try to deactivate all plugins, and switch to default theme. If it doesn't happen there then there is something with your plugins/theme and then turn them on one by one and see which one gives u problems. – Miha Rekar Oct 6 '12 at 17:07
It's not fault of any plugins as it seems. Any other idea what could cause that? – mathiregister Oct 8 '12 at 6:43
What about theme? – Miha Rekar Oct 8 '12 at 6:46
Well, the only functions that could have anything to do with this are those … cl.ly/code/121u2I2F2X2K However I tried to comment-out them one by one and it didn't make a difference. And as you can see of course the search-form.php template that is posted above in my question. – mathiregister Oct 8 '12 at 15:05

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.