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

Jesse Friedman highfive at jesserfriedman.com
Mon Feb 11 03:41:16 UTC 2013


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>


More information about the wp-hackers mailing list