user2600789
user2600789

Reputation: 1

Search Function on Wordpress site is not working

I am working on the website, www.carsofchange.com, and the search function is working. It returns, "Sorry, no posts matched your criteria." for all searches.

I'm using the Sleek Child Theme and the Genesis platform.

I opened the PHP file that runs the search but I am not search how to know if this is where the error is. The PHP file is below:

<div id="topnav">
<div class="wrap">
<!-- end #topnav <p>
        <a class="rss-topnav" rel="nofollow" href="<?php    bloginfo('rss_url'); ?>"><?php _e("Posts", 'genesis'); ?></a>
        <a class="rss-topnav" rel="nofollow" href="<?php bloginfo('comments_rss2_url'); ?>"><?php _e("Comments", 'genesis'); ?></a>-->
     <p>        
<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
<input type="text" size="put_a_size_here" name="s" id="s" value="Search"   onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"/>
<input type="submit" id="searchsubmit" value="Search" class="btn" />
</form></p>
</div><!-- end .wrap -->
</div><!-- end #topnav -->

It doesn't seem like a CSS error and I've tried turning on and off the Search Everything plugin without any luck. Thank for you time and any help you can provide.

Upvotes: 0

Views: 2768

Answers (1)

Sandeep Maurya
Sandeep Maurya

Reputation: 51

Try with this code:

<form method="get" id="search-form" action="<?php echo esc_url( home_url( '/' ) );?>"> <input type="text" class="field" name="s" id="input-text" placeholder="<?php esc_attr_e( 'Search', 'themename' ); ?>" /> <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( '', 'themename' ); ?>" /> </form>

Upvotes: 2

Related Questions