Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. //* Alter the Genesis Search for so that we can change the destination page and our querystring parameter.
  2. add_filter( 'genesis_search_form', 'b3m_search_form', 10, 4);
  3. function b3m_search_form( $form, $search_text, $button_text, $label ) {
  4. $onfocus = " onfocus=\"if (this.value == '$search_text') {this.value = '';}\"";
  5. $onblur = " onblur=\"if (this.value == '') {this.value = '$search_text';}\"";
  6. $form = '<form method="get" class="searchform search-form" action="' . home_url() . '/search" >' . $label . '
  7. <input type="text" value="' . esc_attr( $search_text ) . '" name="q" class="s search-input"' . $onfocus . $onblur . ' />
  8. <input type="submit" class="searchsubmit search-submit" value="' . esc_attr( $button_text ) . '" />
  9. </form>';
  10.  
  11. return $form;
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement