[wp-hackers] Going from ?s= to ?keyword=

chris chris at lod.com
Mon Feb 11 04:49:35 UTC 2013


http://demand.cr/2011/08/how-to-replace-the-default-search-query-parameter-i
n-wordpress/

something like this maybe?

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Jesse Friedman
Sent: February 10, 2013 10:41 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Going from ?s= to ?keyword=

You should be able to use the following code to generate a form that uses
your domain/keyword as the action location to pass the qet query vars for
the search query.


<form role="search" method="get" id="searchform" action="<?php echo
home_url( '/keyword/' ); ?>">
    <div><label class="screen-reader-text" for="s">Search for:</label>
        <input type="text" value="" name="s" id="s" />
        <input type="submit" id="searchsubmit" value="Search" />
    </div>
</form>



On Sun, Feb 10, 2013 at 10:21 PM, Daniel Fenn <danielx386 at gmail.com> wrote:

> Hello all
>
> I'm just wondering if anyone here know how I can change the default 
> search to go from ?s= to ?keyword=. I've done the bit in 
> searchform.php file but when I go to test it, nothing happens.
>
> Thankyou :)
>
> Regards,
> Daniel Fenn
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



--
thanks
*
*
*jesse friedman*
jes.se.com *
*
Book: Web Designers Guide to WordPress -
http://wdgwp.com/onamazon<http://wdgwp.com/onamazon>
Twitter: @professor <http://twitter.com/professor>
Facebook:
Like<https://www.facebook.com/pages/Jesse-Friedman/204793299545174>
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list