Nice Search

This is a really simple plugin that redirects your WordPress searches (?s=search-term) to the pretty-looking URI version: /search/search-term, and also converts spaces (%20) to plus symbols.

Obviously, you need to have mod_rewrite enabled, so that WordPress can process the /search/ style URIs.

This plugin requires WordPress version 1.5 or higher.

Download

Donate

I’ve spent a lot of time writing this code and supporting it. If you derive some benefit from this code, please consider showing your gratitute in a more tangible
way. Thanks!

I have received $0 this month for my coding efforts.

Donate with PayPalAmazon.com Wishlist


128 Responses to “Nice Search”

  1. [...] Nice Search This is a really simple plugin that redirects your WordPress searches (?s=search-term) to the [...]

  2. moserw says:

    This plugin looks interesting. Let me try it out at my blog. Thanks for sharing. Much appreciated.

  3. [...] Click here to download this plugin. Link Summaryhttp://txfx.net/code/wordpress/nice-search/ This entry was posted on Thursday, July 24th, 2008 at 1:19 am and is filed under Blog, SEO, Tips & Tricks, Wordpress. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. [...]

  4. dedy (subscribed) says:

    Thanks a lot, your plugin is just like the name,
    Really nice…..

    when using
    /?s=nice-search -> /search/nice-search
    but what if using (search in some category)
    /?s=nice-search&category_name=plugin
    or
    /?category_name=plugin&s=nice-search

    can we make it
    /search/nice-search/category_name/plugin
    or
    /category_name/plugin/search/nice-search
    or
    /search/category_name/nice-search
    or even
    /search/nice-search

    thanks for your help

  5. [...] Nice Search – This plugin turns your /?s={query} into /search/{query} which is a) more search friendly and b) easier to type, I feel. I use it quite often on my own site and it’s just really easy to use. A simple, yet effective plugin. [...]

  6. [...] Nice Search byter ut de dynamiska strängarna i webbadressen för sökningarna mot permalänkar. Knappast livsviktigt, men är du av samma uppfattning som undertecknad – att det är de små sakerna som gör det kan det vara intressant att installera tillägget. Du måste ha mod_rewrite aktiverat för att tillägget ska fungera. [...]

  7. Pande (subscribed) says:

    Hi, I have your plugin working on my sites from years ago, but I’ve found recently that is doing a 302 redirect not a 301.
    How can I fix it…?
    THanks Mark.

    http://www.pandeblog.org/?s=heidi should rediret with a 301 to http://www.pandeblog.org/search/heidi/ but response header is 302.

  8. paijo says:

    Nice plug ins thanks Mark,

    Can I make search/search-term/ -> mencari/search-term/

  9. [...] Nice Search -Zmení url adresy vyhľadávania vo Wordpress typu ?s=wordpress na pekné url typu /search/wordpress Ak vás séria zaujala, nezabudnite sa prihlásiť na odoberanie článkov v RSS, tak aby ste neprišli o žiadne novinky. [...]

  10. [...] trouvé un petit bout de code qui règle le problème sur http://txfx.net/code/wordpress/nice-search/ que j’ai juste copié dans les fonctions du thème et ça remarche [...]

  11. Simon says:

    Hi.
    Great and simple plugin. Thank you.

    I have a suggestion: you should urlencode the search. I could not get any search with accents or scandinavian letters (æ, ø, å, ö, ô, è, é, and so on) to function properly after adding this plugin, until I tried this:

    wp_redirect(get_bloginfo(‘home’) . ‘/search/’ . str_replace(‘ ‘, ‘+’, str_replace(‘%20′, ‘+’, urlencode(get_query_var(’s’)))));

    Now it works perfectly.

  12. [...] Nice Search This is a really simple plugin that redirects your WordPress searches (?s=search-term) to the pretty-looking URI version: /search/search-term, and also converts spaces (%20) to plus symbols. [...]

  13. [...] Nice Search is a very simple plugin that makes searches performed on your website look less “Wordpress-y” and more like a custom search engine installed on your website. According to the author’s website: “This is a really simple plugin that redirects your WordPress searches (?s=search-term) to the pretty-looking URI version: /search/search-term, and also converts spaces (%20) to plus symbols.” [...]

  14. Just got this working fine with WP 2.7 and PHP 5! Thanks a bunch.

  15. vetweb says:

    Awesome plugin!
    Works in WP 2.7.1
    Thanks

  16. [...] Nice Search by Mark Jaquith. Takes your ugly search URI (/?s=search-term) and makes it pretty (/search/search-term). I am a big fan of human-readable, hackable URLs. [...]

  17. xen says:

    @Simon

    Thanks Simon, it’s better now.

  18. unclear + Question (subscribed) says:

    sorry to be so dumb, but where exactly do you install/upload the file “nice-search.php”? is there anything else that needs to be done?

  19. Mike says:

    I love this plugin! I use it on every site I create. Thanks a ton!

  20. burçlar says:

    hmmm really nice search !

  21. Denis Mayo says:

    Came clueless, left worried. tnx for the post.

  22. The main problem with this plug in is the redirection is not 301 its 302

Leave a Reply

Note: If you are replying to another commenter, click the "Reply to {NAME} →" button under their comment to help the conversation have a better flow!

Anti-Spam Quiz: