Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase views if attachment embedded within content #43

Open
mrgrt opened this issue Oct 6, 2021 · 2 comments
Open

Increase views if attachment embedded within content #43

mrgrt opened this issue Oct 6, 2021 · 2 comments

Comments

@mrgrt
Copy link

mrgrt commented Oct 6, 2021

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 but it's increasing the views every time I refresh the page content. 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!

@mrgrt
Copy link
Author

mrgrt commented Oct 6, 2021

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

@mrgrt
Copy link
Author

mrgrt commented Oct 6, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant