I’m using Mini Loops 1.1.1
This could be related to this previous topic.
maximum_age=1in shortcode or in widget, I get today’s but also yesterday’s posts. Can’t get if this is a feature or a little bug.
In no way I’m a php programmer (so probably there are more elegant ways), but a little modify to line 149 in helpers.php did the trick:
$mini_loops_minimum_date = date( 'Y-m-d', time() - ( $maximum_age * 24 * 60 * 60 ) +86400 );
As you see, I simply added
+86400i.e. one day expressed in seconds (this is for the casual reader).
Now, by setting
maximum_ageto 1, my miniloop seems to shows exactly what I want, i.e. only posts published today, skipping those posted yesterday.
Please let me know if what I described (and coarsely corrected) was a bug, or if I’m missing something.
One thing I couldn’t have figured out yet is if “today” means “current date” or “last 24 hours”. “Current date” would be my fav option.
By the way, thanks for your plugin!
- The topic ‘[Plugin: Mini Loops] maximum_age=1 behaviour (and a possible workaround)’ is closed to new replies.