Support » Fixing WordPress » search form adding extra

  • boattraveller78



    I have a widget for a custom search form on my website as the following (which definitely worked in 2010)

    <form method="get" id="search_form" action="<?php bloginfo('home'); ?>/">
    <p>Search for: <input type="text" class="search_input" value="searchstring"
    name="s" id="s" /></p>
    <input type="submit" id="searchsubmit" value="Search" />

    The problem is that the URL I get is;?s=searchstring

    which does not work because of the ‘<‘

    works fine but I cannot figure out why the ‘<‘ is being added.

Viewing 1 replies (of 1 total)
  • esmi


    Forum Moderator


    <form method="get" id="searchform" action="<?php echo home_url(); ?>">
    <label for="s" class="offset"><?php _e('Keyword(s)');?></label> <input class="text" type="text" value=" " name="s" id="s" />
    <input type="submit" class="submit button" name="submit" value="<?php _e('Search');?>" />

Viewing 1 replies (of 1 total)
  • The topic ‘search form adding extra’ is closed to new replies.