• Resolved sylo18

    (@sylo18)


    Is there a way to automatically find and show the last published match info.

    I want a page called “Latest Match” – At the moment I have to make it manually and put in the match ID number and update it after every match.

    Is there a piece of code or a way for the shortcode to find the id of the last event published automatically?

    Thanks

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

    (@rochesterj)

    Hi there!

    Thanks for reaching out.

    You can create an event calendar, with the event block style. Then use the limit as 1 to load just the latest event.

    Thanks!

    Thread Starter sylo18

    (@sylo18)

    hey,

    sorry no thats not what i meant.

    When you click on an event, you get the full match report.

    I want a link on my navigation menu, to goto the latest published full match report.

    Is there a way to do this?

    Thanks

    Roch

    (@rochesterj)

    Hi there!

    Thanks for your reply.

    That’s an interesting idea!

    We don’t have this option at the moment though. It’s likely that you’ll need some custom code to do that. But maybe you can do it using a redirection plugin or similar.

    Thanks!

    Thread Starter sylo18

    (@sylo18)

    There are plugins that redirect to latest post, however, the match reports are not classed as posts.

    What are they classed as? that might help me figure out how to implement this.

    Thanks

    Plugin Contributor Savvas

    (@savvasha)

    Hi @sylo18 ,

    I am not sure what do you mean with “Match Report”. Is this the Match page? If yes, then matches/events are Custom Post Types (CPT) with post-type sp-event. So in your query you can add the post-type field to get the latest match/event

    Thanks,
    Savvas

    Thread Starter sylo18

    (@sylo18)

    Nice, thanks I managed to do it with the “eth redirect to latest post” plugin and editing the code to point to sp-event in case anyone else is looking to do the same.

    Plugin Contributor Savvas

    (@savvasha)

    Hi @sylo18 ,

    I am glad you sorted it out!

    Thanks,
    Savvas

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show Last Match Report’ is closed to new replies.