Last active
March 14, 2018 10:14
-
-
Save braddalton/9bb2f4d76c99e4b5faae54b32d3c5625 to your computer and use it in GitHub Desktop.
Custom Entry Meta ( Post Info ) for Genesis https://wpsites.net/web-design/2-ways-to-modify-the-genesis-post_date-shortcode/
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
// Add Shortcode | |
function custom_shortcode() { | |
return '<span class="custom-entry-meta" itemprop="name">PUBLISHED ON 2017-10-03 | New York Times</span>'; | |
} | |
add_shortcode( 'custom', 'custom_shortcode' ); | |
add_filter( 'genesis_post_info', 'sp_post_info_filter' ); | |
function sp_post_info_filter($post_info) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit] [custom]'; | |
return $post_info; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment