• Hi,

    Thanks for the great plugin! I have an issue where I’d like to increase the views of embedded media within my post content.

    I’m using the pvc_view_post function to increase the view count of attachments/media but it’s increasing the media views every time I refresh the page that I’m calling the function on. How do I increase the view only once so it behaves the same way as viewing the attachment directly and only increases the view once (so multiple refreshes don’t keep increasing the view count).

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mrgrt

    (@mrgrt)

    Doing a little digging, it looks like the pvc_visits cookie is not being set when I call the pvc_view_post function.

    Thread Starter mrgrt

    (@mrgrt)

    It looks like the issue may be the following:

    Cannot modify header information – headers already sent by (output started at /var/www/wordpress/wp-includes/class.wp-styles.php:214) in /var/www/wordpress/wp-content/plugins/post-views-counter/includes/counter.php on line 379

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘View keeps increasing using built in function’ is closed to new replies.