Nice Search Plugin!
This plugin is a very simple redirect plugin. The Plugin change WordPress’ search context “?s=searched%20word” to permalink “/search/searched+word/” one. Also change “%20″ to “+”. Thanks to Mark Jaquith!
Here is the Plugin;
You can see what code the plugin has;
<?php /*
Plugin Name: Nice Search
Version: 0.2
Plugin URI: http://txfx.net/code/wordpress/nice-search/
Description: Redirects ?s=query searches to /search/query, and converts %20 to +
Author: Mark Jaquith
Author URI: http://txfx.net/
*/
function txfx_nice_search() {
if ( is_search() && strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === false && strpos($_SERVER['REQUEST_URI'], '/search/') === false ) {
wp_redirect(get_bloginfo('home') . '/search/' . str_replace(' ', '+', str_replace('%20', '+', get_query_var('s'))));
exit();
}
}
add_action('template_redirect', 'txfx_nice_search');
?>
That’s All!
You can download it from here:
Nice Search Plugin (490 bytes, 227 hits)

Recent Comments