Icon Font is a great ‘tool’ to help designers add awesome icons to their website and we love them too. In fact, we’ve written numerous articles on how to add different set of Icon Fonts to any WordPress site. Here are some of them:
- How to Use Octicons Icon Font in WordPress
- How to Load Genericons Icon Font in Genesis Framework
- How to Load Font Awesome Icon Font in Genesis Framework
However, in this tutorial, we’re going to show you exactly how to use Dashicons icon font to customize Genesis Framework meta. This tutorial is very straightforward and shouldn’t take you more than 10 minutes to follow. we’ve provided all the codes you need and here’s what our entry meta will look like.
First, copy all the PHP code from functions.php
file below and paste it in the functions.php
file of your Genesis child theme.
1. The first block of code is required to register the Dashicons icon font. Since WordPress is already bundled with all Dashicons files, we need to use wp_enqueue_scripts
to enqueue it to be able to display the icons on the front end of our site. If you choose to use different set of icon font, you may remove this code and have to manually register your icon font. You may refer to any of the tutorial we’ve mentioned above.
2. The second block of code is required to rebuild on entry header meta in order to remove the word ‘by’ before the author name.
3. The third block of code required to rebuild on entry footer meta to remove the ‘Filed Under’ phrase before the category and ‘Tagged With’ phrase before the post tags.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
4. Next, once you’ve done copying the PHP code, you can copy all the CSS code from the style.css
file below and paste it in style.css
file of your child theme.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
Voila. Once you’ve done copying all the codes, save it and please refresh your site and you’ll see the nice Dashicons icon font on the post meta. If you’ve any question, please drop your comment in the comment section below.
Don’t forget to subsribe to our RSS and follow us on Twitterand Google+ for more awesome WordPress tutorials and tips.
Leave a Reply