Last active
June 9, 2021 15:11
-
-
Save srikat/7be0e2e83df7de9971e0 to your computer and use it in GitHub Desktop.
Using Font Awesome in WordPress. http://sridharkatakam.com/using-font-awesome-wordpress/
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
// Load Font Awesome | |
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
function enqueue_font_awesome() { | |
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css' ); | |
} |
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
<i class="fa fa-phone"></i> +91 1234567890 |
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
.fa-phone { | |
font-size: 25px; | |
vertical-align: middle; | |
padding-right: 5px; | |
} |
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
.menu-primary li a:before { | |
font-family: FontAwesome; | |
padding-right: 7px; | |
/*font-style: normal; | |
font-weight: normal; | |
text-decoration: inherit;*/ | |
} | |
/* Home menu item */ | |
#menu-item-1616 a:before { | |
content: "\f015"; | |
} | |
/* Pages menu item */ | |
#menu-item-1413 a:before { | |
content: "\f0e8"; | |
} | |
/* Categories menu item */ | |
#menu-item-1414 a:before { | |
content: "\f15b"; | |
} |
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
#meta-3 .widget-title:before { | |
font-family: FontAwesome; | |
padding-right: 7px; | |
content: "\f05a"; | |
font-style: normal; | |
font-weight: normal; | |
text-decoration: inherit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment