How to ‘mask’ page/post views

Posted in: Newspaper
Post count: 71

I want to remove page/post views from the pages/posts themselves so it is not visible to other people, but I want it to keep counting the views so I can still use the Filtering by popularity (im guessing it filters by views) and see the views when im in the page/post editor on wordpress.

Is this possible? If so.. how? I am guessing maybe some custom css could remove the views thingy just like meta info can be masked.

Post count: 20688

Hi,

You could hide them with some CSS, the views are only displayed in the post page. Try a code like this, it should work for all the post templates

.single .td-post-views {
display: none;
}

Enter it in Theme panel->Custom CSS code section.

Thanks

Post count: 71

Hello, this did not work…
Is it possible the code is not good, because I did exactly as you said.

Post count: 20688

Hi,

It should work for the post pages, although maybe not for all the post templates. What post templates are you using?
I will test the ones you mention, maybe this code needs to be modified.

Post count: 71

On the Theme Panel settings under Post Settings I have a default post template STYLE 13 set site wide, all of my posts use that template.

I had tested with Style 10 and it didn’t do anything for that one either.
I tried adding the CSS under Custom CSS code section in theme panel like you said, when that didn’t work I also tried adding it to Live CSS but it won’t work either.
And I emptied cache after these changes, and I tried switching between both the Ajax and Normal counter thinking the code might work for one of them.

Post count: 20688

This will work in that case, for post template style 13
https://www.screencast.com/t/luGkC6S1Y

.td-post-template-13 .td-post-header .td-post-title .td-post-views {
display: none;
}

Post count: 10

This will work, but the view count is visible for a second when page loads.
Thats not good.

Post count: 20688

The code will take some time to apply, it will be loaded after the theme CSS. Try to enter it in the theme stylesheet file, at the end
https://www.screencast.com/t/Put5TBsnn
The the code would load faster.

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.