WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] My search function does not work anymore. (9 posts)

  1. acrane
    Member
    Posted 4 years ago #

    I have to have a "splash" page before entering the wordpress site, which is located in the root. I did this by adding:

    DirectoryIndex gohere.htm
    to the .htaccess file. (so i can save index.php for the site and still have it in the root)

    On the splash page, depending on where you click you will either go to "/2/index.htm" or "index.php" (which is in the root)

    Ever since i did this my search box does not work anymore. it just redirects to the gohere.htm.

    Do i have to add something else in the .htaccess to make my search work?

    thanks, tropicalfoods.com

  2. alism
    Member
    Posted 4 years ago #

    Try editing the form action for the search to post to:
    /index.php

    instead of:
    http://www.tropicalfoods.com/

  3. acrane
    Member
    Posted 4 years ago #

    I think your talking about line 124 on the includes/general-template.php which says

    $form = '<form role="search" method="get" id="searchform" action="' . get_option('home') . '/" >

    what exactly do i change? the 'home' ???

  4. whooami
    Member
    Posted 4 years ago #

    are you using the search widget, OR is the search built into the theme?

  5. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    do you have a searchform.php in your theme? or some such file...

  6. acrane
    Member
    Posted 4 years ago #

    I've been working off wordpress default theme that comes with the unzip, and changing the look. but all the functionality is the original theme.

    in my header i have <div id="searchbox"><?php get_search_form(); ?>

    i do have the search.php that came with it in there, as well as a searchform.php that i created.

    thanks.

  7. acrane
    Member
    Posted 4 years ago #

    Anything? I feel like i'm close to a solution here.
    thanks.

  8. acrane
    Member
    Posted 4 years ago #

    Solution:

    line 124 -> wp-includes/general-template.php

    change

    $form = '<form role="search" method="get" id="searchform" action="' . get_option('home') . '/" >

    to

    $form = '<form role="search" method="get" id="searchform" action="/index.php" >

  9. consultiq
    Blocked
    Posted 4 years ago #

    nevermind...

Topic Closed

This topic has been closed to new replies.

About this Topic