Last active
February 23, 2018 20:15
-
-
Save anwerashif/18aa13a838df47e4c984eb77b7be8a8a to your computer and use it in GitHub Desktop.
Add FontAwesome Icon to Search Form Input Button
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
<?php | |
// Do NOT add the PHP opening tag | |
// Add Icon Fonts to theme | |
add_action( 'wp_enqueue_scripts', 'rs_enqueue_styles' ); | |
function rs_enqueue_styles() { | |
wp_enqueue_style( 'fa', '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', array(), '4.5' ); | |
} | |
// Add search icon to Genesis search form input button | |
add_filter( 'genesis_search_button_text', 'rs_search_button_text' ); | |
function rs_search_button_text( $text ) { | |
return esc_attr( '' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment