Skip to content

Instantly share code, notes, and snippets.

@natenault
Created January 18, 2018 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natenault/894f9d7b313fb3a479bfd09db2b5bf08 to your computer and use it in GitHub Desktop.
Save natenault/894f9d7b313fb3a479bfd09db2b5bf08 to your computer and use it in GitHub Desktop.
Display icon markup before post categories and tags
/**
* 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