In the members-only forum Chris asks,
I would love a tutorial on how to edit and update the post info on eleven40, specifically on how to integrate the Post Views Counter plugin into the post info section.
The Post Views Counter looks like a great plugin for showing post views and it comes with a shortcode, but the shortcode is not behaving.
I am trying to include the short code in my functions file and the counter outputs, but there is a separate div wrapping the counter. I can’t for the life of me to get the counter to display inline with my other post info. I am using the Genesis framework...
In this tutorial we shall
- use Post Views Counter plugin's
pvc_post_views_html
filter hook to simplify the output by that plugin - create a custom
post_views
shortcode which outputs Post Views Counter plugin's HTML - customize entry meta in the entry header for single Posts using
genesis_post_info
filter hook
so that post info in the entry header on single Posts will display the number of times that Post has been viewed.
Before:
After:
Step 1
Install and activate Post Views Counter plugin.
Go to the plugin's settings > Display and set the Position to manual
.
Step 2
Add the following in child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Sridhar – worked like a charm! Thanks for the great tutorial!