Title: View keeps increasing using built in function
Last modified: October 6, 2021

---

# View keeps increasing using built in function

 *  [mrgrt](https://wordpress.org/support/users/mrgrt/)
 * (@mrgrt)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/view-keeps-increasing-using-built-in-function/)
 * 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](https://wordpress.org/support/users/mrgrt/)
 * (@mrgrt)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/view-keeps-increasing-using-built-in-function/#post-14943315)
 * 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](https://wordpress.org/support/users/mrgrt/)
 * (@mrgrt)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/view-keeps-increasing-using-built-in-function/#post-14943401)
 * 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.

 * ![](https://ps.w.org/post-views-counter/assets/icon-256x256.png?rev=2973820)
 * [Post Views Counter](https://wordpress.org/plugins/post-views-counter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-views-counter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-views-counter/)
 * [Active Topics](https://wordpress.org/support/plugin/post-views-counter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-views-counter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-views-counter/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [mrgrt](https://wordpress.org/support/users/mrgrt/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/view-keeps-increasing-using-built-in-function/#post-14943401)
 * Status: not resolved