down1oad — 2012-03-23T21:32:40-04:00 — #1
Hi guys, I've been trying to design a simple search box on my site but it doesn't seem to be working... (Please forgive me, I'm a noob at PHP :p)
Here is what I'm using:
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<input type="text" value="" name="s" id="s" />
<input type="submit" value="" onclick="" class="search_btn">
Right now when I try using it it just takes me to http://www.mysite.com/%3C?s=searchterm - any advice? Thanks in advance!
ralphm — 2012-03-23T23:49:26-04:00 — #2
Is this a Google search form? Your form's only action is to call the home page, but unless that has some kind of script on it, nothing much can happen. Or is this part of a CMS?
I recommend you use a standard Google search form, which is super easy to set up.
down1oad — 2012-03-24T00:35:02-04:00 — #3
Yep, I'm using wordpress - the correct page for that the search button should bring the user to would be http://www.mysite.com/?s=searchterm.
ralphm — 2012-03-24T00:43:36-04:00 — #4
OK, I've moved this to the WP forum, as it's really a question of how to use that CMS.