[Plugin: WP SlimStat Shortcodes] reset filters during page load?
-
Using Slimstat 2.8.2; shortcode 2.0. I find some counter-intuitive behavior that either means I’m doing something wrong, am not aware of additional functionality, or there’s an actual problem.
If I wanted to count all visits to a post called “tricksy” in the last year, I would be tempted to try the shortcode:
[slimstat f=’count’ w=’ip’ lf=’resource contains tricksy | month equals 1 | day equals 1 | interval equals -1′]
But this delivers zero counts. By random chance, I found that if I produce two shortcodes in a row:
[slimstat f=’count’ w=’ip’ lf=’resource contains tricksy’]
and
[slimstat f=’count’ w=’ip’ lf=’month equals 1 | day equals 1 | interval equals -1′]I first get the number of accesses to the post in the current month, and THEN get the number I originally wanted. Ordinarily, the second line would produce the number of visits to the entire site in a year, but the first ‘resource contains’ filter is *sticky*. It applies to the second query as well.
The problem is if stats for more than one post wants to be counted on the same page, the stickiness kills me. If I wanted to count access to the ‘tricksy’ post as above, then follow up with a count of accesses to a post called “false” then I would be tempted to go through the same two-step as before (why two steps?) and follow up with a second pair beginning:
[slimstat f=’count’ w=’ip’ lf=’resource contains false’]
but I get zero count because “tricksy” was sticky, and it now wants a resource that contains both tricksy and false, and there is no such post.
So after all this gruesome detail, my question is if there is a way to clear or reset the filters for a second-pass at new statistics? Or am I doing something fundamentally wrong in my approach?
https://www.ads-software.com/extend/plugins/wp-slimstat-shortcodes/
- The topic ‘[Plugin: WP SlimStat Shortcodes] reset filters during page load?’ is closed to new replies.