• Resolved cambofrizz

    (@cambofrizz)


    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi @cambofrizz ,

    Are you using a specific calendar for your countdown widget? Maybe the setting for this calendar is already set to Matchday?

    Thanks,
    Savvas

    Thread Starter cambofrizz

    (@cambofrizz)

    Hi @savvasha ,

    Ah yes, you’re right, the calendar is set to order by matchday, which makes sense for the calendar, especially in list view.

    However, I still think it does not make sense for a widget supposed to display the next match. So, there should either be a setting to override the default sorting (like I have done in the countdown code), or the selection for the countdown source should not be a calendar, but rather a league and season.

    In this case, you can just create a new calendar with the same settings and different ordering criteria to match your desired settings.

    Thread Starter cambofrizz

    (@cambofrizz)

    Creating a new calendar only for the countdown to work properly seems to me the least logic and in any case inconvenient.

    Including a setting in the choices to override the default sorting is
    a) not so difficult
    and
    b) much more logical

    But, as I’ve noticed before, it seems especially @rochesterj considers SportsPress a finalized project, which doesn’t need any adjustments whatsoever.

    Plugin Contributor Savvas

    (@savvasha)

    Hi @cambofrizz,

    If what @rochesterj proposed is inconveniet for you, then you can continue with altering the countdown.php template. Please make sure that you will add it inside /sportspress/ folder of your child theme.

    SportsPress is an ongoing dynamic opensource project. You are free to come at https://github.com/ThemeBoy/SportsPress and make a pull request of any new feature you want. No matter how difficult, easy, logical or non-logical it seems ??

    Thanks,
    Savvas

    Thread Starter cambofrizz

    (@cambofrizz)

    Hi @savvasha ,

    Of course I have already put the countdown.php template in my child theme structure. But why is there no effort whatsoever to put this very simple adjustment into the countdown widget?

    I’m quite frustrated that you guys are labelled ‘Plugin Contributors’ but seem to be totally unwilling to adjust anything in the SportsPress plug-in, let alone improve it. One just has to have a look at all the support threads here and the ‘suggestions’ on your own website, most of which are completely ignored as well.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ordering of widget ‘Countdown’’ is closed to new replies.