ThemeShaper Forums » Thematic


Can't input text to search box

(2 posts)
  • Started 12 years ago by joshuaiz
  • Latest reply from joshuaiz
  • This topic is resolved
  1. joshuaiz


    I have a search box inserted in a div in thematic_belowheader(). The search box (& button) show up but it won't allow me to input text into the search field or click the "Search" button. The code was copied from Ian's code to move the search box to the access div so it should match the thematic_search_form() exactly.

    Is there any reason why a search box can't be placed anywhere? Is there something else I am missing here?

    The code is as follows:

    form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <div><input type="text" value="<?php if(is_search() ) { the_search_query(); } else { echo 'Search...'; } ?>" name="s" id="s" onfocus="if(this.value=='Search...')this.value='<?php the_search_query(); ?>'" onblur="if(this.value=='')this.value='Search...'" />
    <input type="submit" id="searchsubmit" value="Search" />


    Posted 12 years ago #
  2. joshuaiz

    I figured this out - you have to place the search box with an action hook, not just willy-nilly anywhere in your theme :)

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.