Created
January 18, 2018 10:27
-
-
Save natenault/894f9d7b313fb3a479bfd09db2b5bf08 to your computer and use it in GitHub Desktop.
Display icon markup before post categories and tags
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
/** | |
* Display icon markup before post categories and tags | |
* @param string $post_meta | |
* @return string | |
*/ | |
function nn_post_meta( $post_meta ) { | |
$icon_category = "<i class=\'fa fa-folder-open\'></i>"; | |
$icon_tag = "<i class=\'fa fa-tag\'></i>"; | |
$post_meta = sprintf( | |
'[post_categories before="%s"] [post_tags before="%s"]', | |
$icon_category, | |
$icon_tag | |
); | |
return $post_meta; | |
} | |
add_filter( 'genesis_post_meta', 'nn_post_meta' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment