Viewing 6 replies - 1 through 6 (of 6 total)
  • mike.chiv

    (@mikechiv)

    Hi there,

    I recently posted a very similar question and have had some success in solving it. My solution does not have all the simplicity of a shortcode unfortunately, but here it is just in case it helps. Screenshot of the results (Next matches are off-screen).

    In short, I ran several instances of WP_Query on my existing Sportspress Events, based on the desired team and whether or not the posts were published or scheduled, giving me latest and upcoming matches.

    It’s not quite grabbing the data from calendars as you requested, but you may be able to use Events in the same way. Or even modify the code to work for calendars…

    Anyway, hope this helps.

    Thread Starter fnab07

    (@fnab07)

    hii.. thanks mike.chiv for the help

    i use this shortcode in my homepage to show “next match”
    [event_blocks id="191" status="future" number="1" link_teams="0" paginated="0" rows="1" show_all_events_link="0" order="asc"]
    is it right? o.O

    i’ve used link_team="0" but still link to event detail, how to remove the link ?

    please see this capture https://prntscr.com/6csxs1

    i hope, i can use shortcode for previous match.. anyone can help? ??

    Plugin Author Brian

    (@brianmiyaji)

    @fnab07 regarding the event link, this is something that hasn’t been added to the shortcode yet, but I’ll be sure to include a “link_events” variable in the next update.

    For previous match, you can change the shortcode to:

    [event_blocks id=”191″ status=”publish” number=”1″ link_teams=”0″ paginated=”0″ rows=”1″ show_all_events_link=”0″ order=”desc“]

    Thread Starter fnab07

    (@fnab07)

    thanks for help ??
    DONE!

    mike.chiv

    (@mikechiv)

    Well my method suddenly looks massively long-winded now! I will probably change over to the shortcode!

    Is it possible to filter by team or league ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Next Match & Previous Match Shortcode’ is closed to new replies.