Last active
August 29, 2015 14:20
-
-
Save nhatdongnguyen/99fa9de17fc801be54ed to your computer and use it in GitHub Desktop.
Display views count after entry title on single entry
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
<?php | |
//* Display views count after entry title on single entry | |
add_action( 'genesis_entry_header', 'post_views_count' ); | |
function post_views_count() { | |
if ( ! is_singular( 'post' ) ) | |
return; | |
echo post_views(get_the_ID()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment