Last active
August 29, 2015 14:04
-
-
Save wpspeak/c5160da5eafdddb369f7 to your computer and use it in GitHub Desktop.
Add Dashicons Icon to Genesis Framework Meta
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
<?php //* Please don't copy this opening php tag | |
//* Enqueue Dashicons Scripts | |
add_action( 'wp_enqueue_scripts', 'afn_add_dashicons' ); | |
function afn_add_dashicons() { | |
wp_enqueue_style( 'dashicons' ); | |
} | |
//* Customize the entry meta in the entry header (requires HTML5 theme support) | |
add_filter( 'genesis_post_info', 'afn_custom_header_meta' ); | |
function afn_custom_header_meta($post_info) { | |
$post_info = '[post_date] [post_author_posts_link before=""] [post_comments before=""] [post_edit]'; | |
return $post_info; | |
} | |
//* Customize the entry meta in the entry footer | |
add_filter( 'genesis_post_meta', 'afn_custom_footer_meta' ); | |
function afn_custom_footer_meta($post_meta) { | |
$post_meta = '[post_categories before=""] [post_tags before=""]'; | |
return $post_meta; | |
} |
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
.entry-time:before, | |
.entry-author:before, | |
.entry-comments-link:before, | |
.entry-categories:before, | |
.entry-tags:before { | |
display: inline-block; | |
-webkit-font-smoothing: antialiased; | |
font: normal 18px/1 'dashicons'; | |
margin-right: 5px; | |
} | |
.entry-author:before, | |
.entry-comments-link:before { | |
margin-left: 15px; | |
} | |
.entry-time:before { | |
content: "\f145"; | |
} | |
.entry-author:before { | |
content: "\f110"; | |
} | |
.entry-comments-link:before { | |
content: "\f125"; | |
} | |
.entry-categories:before { | |
content: "\f318"; | |
} | |
.entry-tags:before { | |
content: "\f323"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment