Support » Themes and Templates » Search button doesn't work

  • Resolved dpdotcom

    (@dpdotcom)


    I build a website using wordpress.Today I tried to edit the search template,after that I found the search button doesn’t work,click the search button,the page is still,nothing happen.Then I uploaded the backup search template to cover the modified one,but the search still not work.I have googled but not find the solution I need.
    My site http://downpress.com,thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • you dont have the script for the search form running it seems like. If you look at the page source of wordpress.org, you can see their code looks like this

    <form action="http://wordpress.org/search/do-search.php" method="get" id="head-search">
    			<input class="text" name="search" type="text" value="Search WordPress.org" maxlength="150" onfocus="this.value=(this.value=='Search WordPress.org') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Search WordPress.org' : this.value;" /> <input type="submit" class="button" value="Go" />
    		</form>

    where yours is this:

    <form method="get" action="http://downpress.com" name="search-form" class="search-form">
    
    							<div class="row">
    
    								<input type="text" value="Search..." name="s" onclick="this.value=''" onblur="if('' == this.value) {this.value='Search...';}" />

    you do not have the </form> and the action of your site is to your main domain, and not to a .php page.

    Maybe you should instead the input type=”button” to “image”,and set an image as search button

    Thread Starter dpdotcom

    (@dpdotcom)

    Thanks both,it’s not about the script and I do have the </form>,I changed the input type,now it works.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search button doesn't work’ is closed to new replies.