0

When I enter in a search query in my blog's search box, it simply returns to my blog's front page with URL http://www.mywebpage.com/?s+id%3D=mysearchquery. Here's my search box code:

<form method="get" id="searchform" action="<?php esc_url( home_url( '/' ) ); ?>">
  <?php 
    echo "<!--[if !IE]> --><input type='text' name='s id='s' class='blog_search_field' placeholder='Search' value=''/><!--<![endif]-->";
    echo "<!--[if IE]><input type='text' name='s id='s' class='blog_search_field' value='Search' /><![endif]-->";
  ?>    
</form>

The front page is a static page at www.mywebpage.com, and then the blog index page is at www.mywebpage.com/?page_id=7. Any pointers would be terrific. Thanks for reading!

  • Make a search.php like TwentyFifteen in your theme and you may see the search result. – Mayeenul Islam Jan 11 '15 at 16:50
  • If blog index page isn't at the root why would URL point there? How exactly is your front/home is set up? – Rarst Jan 11 '15 at 18:01
  • Hi @Rarst, thanks for the comment. The front page was selected under "Settings->Reading->Front page displays" to be a static page. The blog index page is at www.mywebpage.com/?page_id=7, and it's a homemade template. – Rogare Jan 11 '15 at 18:47
2

I think that your problem is a syntax error: name='s should be name='s'.

  • Gald to help ;) – cybmeta Jan 11 '15 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.