• Resolved joelongstreet

    (@joelongstreet)


    Still pretty new to wordpress but I’m starting to get the hang of it. Really like it too.

    Where can I access the search form? I see this <?php get_search_form(); ?> but how do I know where it’s getting it from?

    Specifically, I just want to remove the text “Search For” before the search entry field.

    Thanks,

    Joe

Viewing 4 replies - 1 through 4 (of 4 total)
  • it will be in your theme’s search.php or searchform.php or similar.
    Different themers do it differently

    Thread Starter joelongstreet

    (@joelongstreet)

    I don’t see it anywhere? I looked through search.php and sidebar.php but I can’t find any text that says “Search For”?

    Thread Starter joelongstreet

    (@joelongstreet)

    If anyone comes across this problem, this is how I solved it. I created a new file called searchform.php and posted the following code into it:

    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <input type="text" value="<?php echo attribute_escape($s); ?>" name="s" id="s" />
    </form>

    This allows me to style it like I want.

    I came across the same problem, and you are right it is hard to find.
    Just for those who are dying to know where the phrase is…:

    I found the function get_search_form() in /wp-includes/general-template.php

    It checks if there is a file called searchform.php, if it doesn’t exist it displays it’s own form with the “Search for:” phrase in it.

    You solved it the right way by creating a searchform.php ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search Form – Folder Location’ is closed to new replies.