WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Problem with the search bar (4 posts)

  1. edinchez
    Member
    Posted 3 years ago #

    Hey guys, I'm having a problem with my search bar. First, I had a search widget on my sidebar, and it worked fine. But then, I removed the widget and added the code

    <?php get_search_form(); ?>

    to my header, and the search bar is showing up fine, when I try to search something, it redirects to

    http://www.websitename.com/SITETITLE/?s=keyword

    but I need it to redirect to

    http://www.websitename.com/?s=keyword

    How can I fix this?

  2. kgagne
    Member
    Posted 3 years ago #

    Have you tried using the code from the widget instead?

    Maybe this will help:

    http://codex.wordpress.org/Function_Reference/get_search_form

  3. edinchez
    Member
    Posted 3 years ago #

    oh, looks like the problem was my theme's searchform.php! Thanks a lot!

  4. kgagne
    Member
    Posted 3 years ago #

    Glad it helped!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.