Last active
January 1, 2016 05:39
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* 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( '' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.search-form input[type="submit"] { | |
font-family: FontAwesome; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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