Search Redirector

Basically, Plugin causes WP to ignore any ?s= search requests, and instead, only performs searches on ?search= instead.

It does not modify the search forms, the theme will need to be changed to direct requests at the correct name. Could easily be placed in a themes functions.php instead too.

[source language=”php”]<?php
Plugin Name: Search Redirector
Plugin URI:
Description: Redirects ?s= to ?search=
Version: 1.0
License: Public Domain; Do what ever you please
Author: DD32
Author URI:

add_action(‘parse_request’, ‘search_request’);
function search_request($wp){
$wp->query_vars[‘s’] = ”;
if( !empty($wp->query_vars[‘search’]) )
$wp->query_vars[‘s’] = $wp->query_vars[‘search’];

add_filter(‘query_vars’, ‘search_queryvars’ );
function search_queryvars( $qvars ){
$qvars[] = ‘search’;
return $qvars;


Rather simple really..