• Resolved kthomp53

    (@kthomp53)


    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 . . .";} ?>"

Viewing 4 replies - 1 through 4 (of 4 total)
  • Wrong. Create your own searchform.php file and place that in your current theme folder. It will be used automatically.

    Thread Starter kthomp53

    (@kthomp53)

    I ment to say theme folder…

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

    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..

    Thread Starter kthomp53

    (@kthomp53)

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search Bar Fix’ is closed to new replies.