Searching without standard s input field (4 posts)

  1. JsonB123
    Posted 5 years ago #

    I am trying to make a search form without the use of plugins (so please dont point me towards one) that will function without the s input.

    I am able to get this to work when there is s input...but I just dont want that field there, and I don't want to just hide it via CSS...I want it gone entirely.

    When I remove it, the search function no longer works at all and just refreshes the page I'm on. What's even stranger is that if I keep the search text field empty and leave it on my form, I get routed to the index.php template file with the results I want...but I want to use search.php. Search.php is loaded if I actually put something into the search field (not leaving it blank).

    Could anyone explain to me how this is working and how to remove the standard search input the correct way?

  2. Ashe
    Posted 4 years ago #

    I am wondering the same thing...did you ever get an answer?

  3. JsonB123
    Posted 4 years ago #

    I wound up leaving the input field there so it would submit but hidden via CSS. I think that the query that happens needs to have the s input field, even if it's blank. Hope that helps!

  4. Ashe
    Posted 4 years ago #

    Thank you so much! :)

Topic Closed

This topic has been closed to new replies.

About this Topic