Ordering of widget ‘Countdown’
-
In the widget ‘Countdown’ (which is used to display the next match or event) it seems the orderby is wrong. It orders by ‘matchday’ first, where it should be by ‘date’. Especially in these corona times, when some matches may be scheduled at a later date then normal, sometimes weeks later. They still are part of a ‘matchday’ (or maybe a better term is ‘week number’), but not played within that ‘week number’.
So, in the template ‘countdown.php’ I’ve added an extra orderby argument to get the next match right:
$calendar->order = 'ASC'; $calendar->orderby = 'date'; //This is what I've added $data = $calendar->data();
To be honest, I don’t understand why ‘matchday’ should be the orderby argument, when you only want to display the match on the nearest date. Maybe it’s useful in some situations, but then it should be a select choice in the widget.
- The topic ‘Ordering of widget ‘Countdown’’ is closed to new replies.