-
-
Save freezvd/9815510aec26f50ce0d1 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/
This file contains hidden or 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', '//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( '' ); | |
} |
This file contains hidden or 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 { | |
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