Ah, that makes more sense: you’re talking about the wpp_get_views() template tag. You got me worried for a moment hehe.
Anyways, the problem is that the entire post page is being cached – including the views count. This is something that WPP cannot prevent as of now (not even the older versions, actually) since W3TC is caching everything.
While I’m not entirely familiar with W3TC, I know they had something called fragment caching. With it, W3TC allowed users to keep portions of a given page dynamic. I’m not sure if this feature is still available or not, but if it is then you could try something like this to solve the issue:
- Add this to your wp-config.php file:
define('W3TC_DYNAMIC_SECURITY', 'E7C5F12EBCDA5F83A41BF33D778ED' );
, where E7C5F12EBCDA5F83A41BF33D778ED is a random string that serves as a security key, I suppose.
- Then, in your single.php file change your code so it looks something like this:
<!-- mfunc E7C5F12EBCDA5F83A41BF33D778ED
echo wpp_get_views( get_the_ID() ) . " views";
-->
<!--/mfunc E7C5F12EBCDA5F83A41BF33D778ED -->
You can see more on this workaround here.
Give it a try and let me know what happens, alright?
Edit: apparently, the wp-config part isn’t really necessary according to this comment. That user also linked to this other comment with a sample code that apparently works fine (and also explains a bit more how to use fragment caching).