Forums

Search Bar Fix (5 posts)

  1. kthomp53
    Member
    Posted 4 months ago #

    This bugged me.. But if you want to keep the search bar from displaying "type keyword here..." every time (even when you search!) then go to the blue black plugin folder and edit the searchform.php file.

    Replace this:
    value="type keyword here ...<?php the_search_query(); ?>"

    With this:
    value="<?php if(isset($_GET['s'])){the_search_query();}if(!isset($_GET['s'])){echo "Search . . .";} ?>"

  2. esmi
    Member
    Posted 4 months ago #

    Wrong. Create your own searchform.php file and place that in your current theme folder. It will be used automatically.

  3. kthomp53
    Member
    Posted 4 months ago #

    I ment to say theme folder...

    I'm not sure what you are saying, but this fix is for the blue-black theme...

  4. t31os_
    Member
    Posted 4 months ago #

    value="<?php if(isset($_GET['s'])){the_search_query();}if(!isset($_GET['s'])){echo "Search . . .";} ?>"

    Could be done as...
    value="<?php if(isset($_GET['s'])) the_search_query(); else echo "Search . . .";?>"

    No point doing isset then !isset ....

    The !isset is the else of isset, so you might aswell just be using else..

  5. kthomp53
    Member
    Posted 4 months ago #

    Yeah I know.. I have no idea why I wrote it like that... As long as it works...

Reply

You must log in to post.

About this Topic

Tags