Forums

[resolved] Searching only works at root level (3 posts)

  1. inorganik
    Member
    Posted 2 years ago #

    The search function on my wordpress powered site only works at the root level. I have about 14 pages that also have a search field. The problem is when you search on one of these pages, it creates the search one level down from the root under the page level, and redirects me to my "not found" page. Here's an example:

    Searching from the root:
    http://mysite.com/?s=mysearch -works fine
    http://mysite.com/my-page/?s=mysearch -errors out

    Could this be because I am using pretty permalinks on my pages? It seems like I should be able to use pretty permalinks and also have the search function work on those pages.

    Your help is appreciated. Thank you.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Check the form action url in searchform.php.

  3. inorganik
    Member
    Posted 2 years ago #

    That was it. Just added "<?php bloginfo('home'); ?>" into the action.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.