Viewing 8 replies - 1 through 8 (of 8 total)
  • I am also having this problem.

    Entering text in the search box and clicking on “Search” ultimately brings me back to the home page.

    For a split second, I can see the browser loading the search results page.

    Typing in a search in the browser address bar works and displays the results instead of jumping to the home page (i.e., “https://whatever.com/?s=searchterm”)

    I don’t really know where to start with this one.

    Thread Starter alienbabeltech

    (@alienbabeltech)

    thanks,

    can somebody help

    Turns out there was a java-script redirect in the index.html file of the site, put there by the former admin, to work around a bug.

    Thread Starter alienbabeltech

    (@alienbabeltech)

    so if you remove the redirect, the search works ?

    i think i have some sort of redirect too that redirects too my homepage

    It’s definitely theme problem I was having the same problem also but I removed old theme and installed new one. Now I am using Inove theme. Works great on my blog. Mobile Phone Repairing

    I was having an issue getting the search to work & this article helped:
    https://www.resourcesforlife.com/docs/item225

    searchform.php:

    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <div>
    <input type=”text” value="<?php the_search_query(); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="Search" />
    </div>
    </form>

    illufoxdesign

    (@illufoxdesign)

    I had problems too. My searches all went to the home page instead a search results page. So I looked at the code from a site where the search was working and found out that I had this missing:

    name="s"

    So I changed this:

    <input type="text" value="<?php echo wp_specialchars($s, 1); ?>" id="s" size="15" />

    to this:

    <input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" size="15" />

    And voila, the search is working!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Search not working’ is closed to new replies.