• Resolved danis039

    (@danis039)


    Hi guys,

    Is there any recommended way to implement links to the previous/next matches (events) in a match page? Something like the_post_navigation() or get_adjacent_post() which would work for SportsPress events. Ideally, this would take events from a calendar, but it’d be enough to filter by a certain team or default team.

    Thanks!!

Viewing 1 replies (of 1 total)
  • Hi there!

    Thanks for reaching out.

    This is more of a general WP question, so we won’t be able to help you that much.

    But it looks like there are functions to do this for taxonomies (competitions/seasons):
    https://wordpress.stackexchange.com/questions/57867/next-and-previous-link-in-custom-post-type-in-the-same-taxonomy-term

    You could use the custom post type sp_events and our custom taxonomies.

    I don’t think there’s a way to load the next post with a specific custom field (in this case the teams are just custom fields, and the calendars are a custom post type in itself, so it isn’t easy to reference the calendar from an event).

    So I’m not sure if there’s a WP function to do this.

    If that’s a vital function for you, you can always use the taxonomies to tie these events together. For example, events for the calendar A can have a new competition called calendar A.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Previous/Next navigation links in Event page’ is closed to new replies.