php - Page view counters not working with W3 Total Cache -
php - Page view counters not working with W3 Total Cache -
i've been using function display popular posts views in wordpress http://www.wpbeginner.com/wp-tutorials/how-to-track-popular-posts-by-views-in-wordpress-without-a-plugin/
then added w3 total cache , counter doesn't updated often.
i've attempted fragment caching per tut , other sources
<!-- mfunc wpb_set_post_views($post_id); --><!-- /mfunc --> but isn't updating counter. tut (or of others) doesn't specify whether line goes in php tags or in html.
i've tried both. in php tags breaks page. outside php tags in regular html doesn't count , renders comment when view source.
anyone else had problem? how did resolve?
ta in advance,
kes
it go in php tags not utilize exact code surrounded php tags (i'm stating in case doing way - i'm unsure question).
you this
<?php mfunc wpb_set_post_views($post_id);?>
php wordpress caching
Comments
Post a Comment