Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active January 1, 2016 22:59
Show Gist options
  • Save srikat/8213804 to your computer and use it in GitHub Desktop.
Save srikat/8213804 to your computer and use it in GitHub Desktop.
Adding a search form input button icon inside the input box in Genesis. http://sridharkatakam.com/adding-search-form-input-button-icon-inside-input-box-genesis/
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' );
}
//* Customize search form input button text
add_filter( 'genesis_search_button_text', 'sk_search_button_text' );
function sk_search_button_text( $text ) {
return esc_attr( '' );
}
.search-form {
position: relative;
}
.search-form input[type="submit"] {
font-family: FontAwesome;
clip: inherit;
width: 16px;
height: 16px;
background: transparent;
color: #999;
right: 10px;
top: 18px;
}
.search-form input[type="submit"]:hover {
color: #F15123;
}
.site-header .search-form {
width: 189px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment