How to make the number of views invisible to visitors
Hi,
From what I see the post views aren’t displayed in the post pages on your website. Or would you like to add them but make them invisible to visitors?
If maybe you want only admins to see them, they can see them in the backend here https://prnt.sc/lU505Kdoct_A and you don’t have to display them on the website.
But it is possible to display them in the post and also hide them for visitors, if that is what you want. Please add them in the post template in the location you want, and let me know.
Thank you!
Then it’s all fine as it is you don’t have to do anything else.
I should also mention that the theme view count is not meant to be taken as an accurate website statistic. The view count can be inaccurate and it’s purpose is not for website owners to base their strategies on.
Please use true analytics for seeing who visits the website, how they interact with the website and what posts have the most views, etc. Google analytics is very popular https://www.monsterinsights.com/how-does-google-analytics-work-beginners-guide/ but there are also other similar services.
Thank you!
No, that is not what I mean. I do not want the number of views on articles to be visible to visitors.
Please let me know where the view numbers are displayed to visitors on your website. I double checked post pages from your website and I can’t see the post views.
The only way visitors will see the views is if you add the post views in the post template -> https://prnt.sc/woNU2fpQXS8i But in the post pages from your website I can’t see them. That’s why I fail to understand what the problem is exactly.
Please let me know where the post views are displayed on your website to visitors, provide a screenshot if possible.
Thank you!
I was confusing the websites, sorry about that.
So to remove the post views from the post template, please edit the template with the composer -> https://prnt.sc/_lkDuWx4VESx and in the composer you can simply delete the post views, for example -> https://prnt.sc/VJQcNFWJ-jhV Then they won’t appear in the post page anymore, which is what you wanted.
Please try it, and sorry again for my confusion. I was checking on the wrong website.
Thank you!
No, you still don’t get it, the views must stay but only visible for admins
I could provide a code to make them invisible to users that aren’t logged in, like regular visitors. Please try this code:
body:not(.logged-in) .tdb_single_post_views {
display: none;
}
You can add it just for posts, edit the post template with the composer and add a Raw CSS element anywhere in the post template https://prnt.sc/Wt8lOtDLl4Eh then add that code in it https://prnt.sc/P-O0VhkYCSGe
Then clear the cache and check on the website. The views should not be displayed anymore if you check in incognito mode for example, or if you log out of the website.
Please try it.
Thank you!
Yes, that did the job for hbpmedia.nl, but where put the code for westfrieslandpraat.nl
hmm strange but there is no option on that site. i must be blind.
Let’s recapitulate.
The post views are displayed on this website https://westfrieslandpraat.nl/ I see them here -> https://prnt.sc/Q53aurAB_5Es
That code I provided should make them invisible to visitors.
The code can be loaded in the post template via a Raw CSS element -> https://prnt.sc/7lBuPFRdC1hL
Alternatively the code can be loaded in the Live CSS -> https://prnt.sc/Fmd24EMnV0fq
Or in the theme panel -> https://prnt.sc/RWTWpDGC7Ij-
Or even in the wordpress customizer -> https://prnt.sc/nLLbT13Eln8B -> https://prnt.sc/gzryKNT_onNO
Either way you load the code, please also clear the cache if you use a caching plugin.
Thank you!