Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active January 1, 2016 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save srikat/8099554 to your computer and use it in GitHub Desktop.
Save srikat/8099554 to your computer and use it in GitHub Desktop.
Replacing search button text with a icon font in Genesis. http://sridharkatakam.com/replace-search-button-text-icon-font-genesis/
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.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 input[type="submit"] {
font-family: FontAwesome;
}
.search-form input[type="submit"] {
font-family: FontAwesome;
background: none;
border: none;
color: #888;
padding-left: 0;
font-size: 2.2rem;
vertical-align: middle;
}
.search-form input[type="submit"]:hover {
background: none;
border: none;
color: #333;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment