WordPress Popular Posts
[resolved] Is there a way to display views counted by WordPress Popular Posts in the post (3 posts)

  1. clouder
    Posted 2 years ago #

    I want to show the number of views of my posts in the posts themselves instead of just the sidebar.

    I'm thinking maybe I can modify single.php to modify the contents of a single posts to also query the views that have been registered in WordPress Popular Posts.


  2. dMpmJ
    Posted 2 years ago #

    You should try reading the plugin's page dude.


    I think you'll most likely want to edit content.php and/or content-*.php and add <?php if (function_exists('wpp_get_views')) { echo wpp_get_views( get_the_ID() ); } ?> somewhere in there. Note that the ID is required. It also accepts a second parameter to indicate time period (e.g., 'weekly'); again, see the plugin's page for more information on how this function works.

  3. clouder
    Posted 2 years ago #


    That worked. You are the bomb :PPPPPPP

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress Popular Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.