• crystalm

    (@crystalm)


    Hi hoping someone can help me here.

    My search box that came with the theme I installed does not work. every time something it typed in the search box, you are sent to a login page which even with correct credentials does not allow you to sign in.
    Is there any way I can fix this?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • PBP_Editor

    (@pbp_editor)

    This is the typical search box code from the default WP theme. Change the classes and the domain to suit your needs.

    <form role="search" method="get" id="searchform" action="https://yoursite.com/" >
    <div><label class="screen-reader-text" for="s">Search for:</label>
    <input type="text" value="" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="Search" />
    </div>
    </form>
    Thread Starter crystalm

    (@crystalm)

    Thanks for that! The code is in and working.
    Except now when you do search it finds results that don’t exist. They are possibly posts that have been written and deleted, hence they shouldn’t come up in a search. Is there any way to fix this?

    Thanks.

    That’s nothing to do with the code suggested, if you see those posts is because the file handling the results is fetching them (search.php if your theme has one).

    Thread Starter crystalm

    (@crystalm)

    Okay so is there some code I can edit, replace or insert that will make in only search for posts that exist?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Seach box doesn’t work’ is closed to new replies.