After updating to newspaper 9 my hidden view counter is showing again

Posted in: Newspaper
Post count: 71

Hi I’ve been using .single .td-post-views {
display: none;
}
to hide post views. After I updated to newspaper 9 the post views are showing again, how can I fix this?

Post count: 20688

Hi,

That code may not work for all the post templates, it may require modifications for some. For example it works for post template default
https://www.screencast.com/t/rsBrMHWh
But it does not work for post template 2
https://www.screencast.com/t/zQ8MO7jBaRg

Try it with !important as a first step

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

I could take a look if that does not work, provide an example where it’s not working.

Thanks

Post count: 71

Hi,

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

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

Both of these work (I’m using layout 13) although I don’t like that you can literally see the view count disappear when the post is loading, is there any way to load it faster so it can’t be seen? I would imagine by adding either of these codes to the theme code, if so, how?

Thanks.

Post count: 20688

Hi,

There is a way, add the code directly in the theme stylesheet at the end of the existing code
https://www.screencast.com/t/b7HMffsEPg
Note that after a theme update the stylesheet will be replaced with the new one, so this will have to be done again.

There would be another way, more future proof. If you have a child theme copy the post template file in it
https://www.screencast.com/t/rcHqPOGA
You can modify it there safely, not worrying about losing this modification when updating the theme. A plus with this method in this case, will be that the views will not be loaded entirely instead of hidden. You could give it a try if you want.

If you don’t have a child theme, one is provided in the theme package and you can install it
https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thanks

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