Created
February 3, 2014 23:55
-
-
Save mjsdiaz/8794926 to your computer and use it in GitHub Desktop.
Use WordPress Dashicons to Add Font Icons to Your Genesis Theme -- http://amethystwebsitedesign.com/use-wordpress-dashicons-to-add-font-icons-to-your-genesis-theme/
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
//Enqueue the Dashicons script | |
add_action( 'wp_enqueue_scripts', 'amethyst_enqueue_dashicons' ); | |
function amethyst_enqueue_dashicons() { | |
wp_enqueue_style( 'amethyst-dashicons-style', get_stylesheet_directory_uri(), array('dashicons'), '1.0' ); | |
} | |
// Optional Custom entry meta in entry header - remove "by"" | |
add_filter( 'genesis_post_info', 'amethyst_filter_post_info' ); | |
function amethyst_filter_post_info($post_info) { | |
$post_info = '[post_date] [post_author_posts_link] [post_comments] [post_edit]'; | |
return $post_info; | |
} | |
// Optional Custom post meta in entry footer - remove text | |
add_filter( 'genesis_post_meta', 'amethyst_filter_post_meta' ); | |
function amethyst_filter_post_meta($post_meta) { | |
$post_meta = '[post_categories before=""] [post_tags before=""]'; | |
return $post_meta; | |
} |
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
.entry-time:before, | |
.entry-author:before, | |
.entry-comments-link:before, | |
.entry-categories:before, | |
.entry-tags:before { | |
color: #f15123; | |
display: inline-block; | |
-webkit-font-smoothing: antialiased; | |
font: normal 20px/1 'dashicons'; | |
vertical-align: top; | |
margin-right: 5px; | |
margin-right: 0.5rem; | |
} | |
.entry-time:before { | |
content: "\f145"; /* dashicons-calendar */ | |
} | |
.entry-author:before { | |
content: "\f110"; /* dashicons-admin-users */ | |
} | |
.entry-comments-link:before { | |
content: "\f101"; /* dashicons-admin-comments */ | |
} | |
.entry-categories:before { | |
content: "\f318"; /* dashicons-category */ | |
} | |
.entry-tags:before { | |
content: "\f323"; /* dashicons-tag */ | |
} | |
.entry-time, | |
.entry-author, | |
.entry-categories { | |
padding-right: 15px; | |
padding-right: 1.5rem; | |
} | |
/* Optional */ | |
.entry-categories, | |
.entry-tags { | |
display: inline-block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment