• Resolved Mirek_PL

    (@mirek_pl)


    Hello.

    On front page countdown widget is working fine (shows first event)
    but on single team page it shows countdown to last event in seasone.

    I’m calling countdown like this:
    $team = new SP_Team( get_the_ID() );
    $next_event = $team->next_event();
    sp_get_template( 'countdown.php', array( 'id' => $next_event->ID ) );

    What could be causing this ?

    Best regards
    Mirek

    https://www.ads-software.com/plugins/sportspress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Roch

    (@rochesterj)

    Hi Mirek!

    The homepage loop is different so probably that is messing up the ID. You’d need to do some debugging to see which is the ID right now, and why it isn’t the right one

    Kind Regards,
    -Roch

    Thread Starter Mirek_PL

    (@mirek_pl)

    You have absolutly right. Thx for pointing that out.

    Cheers.

    Roch

    (@rochesterj)

    You’re most welcome!

    Let us know if you need anything else.

    Kind Regards,
    -Roch

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘countdown on team page shows last event in seasone’ is closed to new replies.