Viewing 2 replies - 1 through 2 (of 2 total)
  • How did you add the search form? Using <?php get_search_form();?>?

    Hi,
    I just had that same problem. Any search of any kind redirected me to my homepage, regardless of the theme I was using or what plugins I had active.

    The problem was this:
    I had installed wordpress in my root directory. Then instead of allowing a wordpress page to be my homepage, I wrote up my own non-wordpress html page to be my homepage and put it in my root directory also. I don’t know how the search works exactly, but when it searches for something, it calls on the homepage address (www.mysite.com). Things work fine when the homepage is a wordpress page, but when the homepage isn’t, the search fails and you get stuck on your non-wordpress homepage.

    Two solutions:
    1) Get rid of your non-wp homepage and design a wp page for the homepage.
    or
    2) Install or move wp to its own subdirectory (ex: “wpsub”) and keep your non-wp page in the root directory. Now, you can safely design a wp page for wordpress to use its homepage. Since this new wp homepage will also be located in the “wpsub” subdirectory, its address will be https://www.mysite.com/wpsub. When wp calls on the homepage, it calls on https://www.mysite.com/wpsub instead of https://www.mysite.com. So people entering your site through the “main gate” (www.mysite.com) will continue to see your non-wp homepage, which you can then link to your wp homepage. The only drawback to this is that all your pages beyond https://www.mysite.com will have the wp subdirectory name attached, which might annoy you.

    Hope this helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘site search results’ is closed to new replies.