Skip to:

Page view counts on blog activity loop

  • gabelon


    Hello, I am using Page View Count plugin to show information on post visits, that shows whenever those are fully displayed. Everything ok there.
    The thing is that I would like to display also that information on each Buddypress post activity loop.

    Page View Count plugin offer some code (see below) to display that information, but I don´t understand yet on which buddypress file (and where) should I insert those lines of code (I’m using a child-theme):

    For Single post, page, object
    <?php pvc_stats_update( $postid, 1 ); ?>
    Increase Page Views Count and echo stats of this post

    <?php pvc_stats_update( $postid, 0 ); ?>
    Increase Page Views Count and return stats of this post

    for Index pages
    <?php pvc_stats( $postid, 1 ); ?>
    Echo stats of this post

    <?php pvc_stats( $postid, 0 ); ?>
    Return stats of this post

    Wordpress version 5.9.3
    Buddypress versión 10.2.0
    Page View Count versión 2.5.3

  • You must be logged in to reply to this topic.
Skip to toolbar