-
Notifications
You must be signed in to change notification settings - Fork 42
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
Reset page/post views #57
Comments
Just update the "views" post meta of that post to 0. |
How is this done in the WordPress admin panel? Apologies if I am missing something. |
When you have access to the underlying database (e.g. by installing the Adminer plugin), you can execute the following query to reset: start transaction;
delete from wp_postmeta where meta_key = 'views'; This will start a transaction to delete all the view data. It isn't gone yet, so if you change your mind, you can just execute Btw: If you want to get a table containing the view data for each post, page and file, you can use: select p.ID, p.post_title, cast(m.meta_value as signed integer)
as view_cnt, p.guid as url, p.post_type
from wp_postmeta m, wp_posts p
where m.meta_key = 'views'
and m.post_id = p.ID
order by view_cnt desc; |
Hello :-)
When copying a page or post to create a new design it also copies over the page views from the original post/page. How do you reset the view count for a page/post?
Thank you for the great work.
The text was updated successfully, but these errors were encountered: