WordPress.org

Ready to get started?Download WordPress

Forums

Search not working (9 posts)

  1. alienbabeltech
    Member
    Posted 5 years ago #

    My website
    http://alienbabeltech.com/main/?cat=3

    Searching for anything returns me to the homepage, how can i get the search going ?

  2. davidanaxagoras
    Member
    Posted 5 years ago #

    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., "http://whatever.com/?s=searchterm")

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

  3. alienbabeltech
    Member
    Posted 5 years ago #

    thanks,

    can somebody help

  4. davidanaxagoras
    Member
    Posted 5 years ago #

    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.

  5. alienbabeltech
    Member
    Posted 5 years ago #

    so if you remove the redirect, the search works ?

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

  6. Anonymous
    Unregistered
    Posted 5 years ago #

    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

  7. ingero
    Member
    Posted 4 years ago #

    I was having an issue getting the search to work & this article helped:
    http://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>
  8. illufoxdesign
    Member
    Posted 4 years ago #

    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!

  9. inzzane
    Member
    Posted 4 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic