Hi @damirkg1,
Superb plugin!
Thanks, I’m glad you like it!
Is there any filter I can use to format the date of the post in HTML layout to be X hours ago, X days ago, etc. formatting?
Actually the plugin provides this out of the box 🙂
If you’re using the widget, on the Stats Tag settings section under the Display date option there’s -pardon the redundancy- an option called Relative that does exactly this.

If you’re using either the wpp_get_mostpopular() template tag or the [wpp] shortcode then you can use the stats_date_format parameter and set it to ‘relative’, like this for example:
With wpp_get_mostpopular():
<?php
$args = array(
'stats_date' => 1,
'stats_date_format' => 'relative'
);
wpp_get_mostpopular($args);
?>
With the [wpp] shortcode:
[wpp stats_date=1 stats_date_format='relative']
-
This reply was modified 4 years, 11 months ago by
Hector Cabrera. Reason: Fixed code formatting
-
This reply was modified 4 years, 11 months ago by
Hector Cabrera.
I’m now even more amazined!
Thanks!