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

Incrementation not working for mobile #40

Open
liogate opened this issue Sep 19, 2019 · 4 comments
Open

Incrementation not working for mobile #40

liogate opened this issue Sep 19, 2019 · 4 comments

Comments

@liogate
Copy link

liogate commented Sep 19, 2019

Hello,

I'm running into an issue with the plugin on the counter.
When I refresh a post 10 times on my desktop, it works like a charm, my post has 10 more views. But when i'm accessing to the same post on my phone, nothing happens.

There's no cache plugin installed.

Thank you for your help !

@lesterchan
Copy link
Owner

If you have a separate mobile theme, your theme might be missing the wp_head function

@liogate
Copy link
Author

liogate commented Sep 19, 2019

@lesterchan the same theme is used for the both situations: smart-mag is used here.

@lesterchan
Copy link
Owner

I am not sure because the logic is the same on the plugin side. There is no special code for mobile. So my guess your theme is not handling something probably if it is rendering the mobile view.

This plugin uses the wp_head action to count the views https://github.com/lesterchan/wp-postviews/blob/master/wp-postviews.php#L49. You might need to check on the theme author.

@liogate
Copy link
Author

liogate commented Sep 19, 2019

Thank you for your answer. May be the plugin should offer a switch to call the incrementation function from the frontend or backend ?

19e8a5a#diff-0fabc5a24043340164e103873f80a77bL88

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

2 participants