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

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -