Support » Fixing WordPress » Search not working, goes to 404 error page

  • hi there!
    In my blog i have a Search and i have been trying to make it work, but no success.

    <li id="searchs">Search
    	<ul id="search">
    		<form id="searchform" role="search" method="get" action="<?php home_url('/') ?>">
    		<label class="hidden" for="s">Search for:</label>
    		<input id="s" name="s" type="text" value="" autocomplete="off" width="22" height="32" tabindex="1" />
    		<input type="image" name="searchsubmit" id="searchsubmit" value="Submit" src="<?php echo get_stylesheet_directory_uri(); ?>/images/fineblack_blog_searchbutton.png" width="22" height="32" tabindex="2" />

    When i type something to search and click the submit button, it leads me to 404 error page…

    It is my first time and i dont know what is missing.
    I think i have followed:
    but it won’t work…

    any ideas? any help? please!!

    thanks in advance for your time 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • i can show “search.php” if necessary, but if when i click “submit” leads me to 404 error page, the error must be out of “seach.php”…

    i dont understand why this happened, since i copied the code from
    and it says:

    action="<?php echo home_url( '/' ); ?>"

    but apparently it was not working well, so i have used

    action="<?php bloginfo('home'); ?>/"

    and now it works perfectly!

    if anyone would like to explain why this happened… i would appreciate!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search not working, goes to 404 error page’ is closed to new replies.