Related Events showing too far in advance

Home Forums Calendar Products Events Calendar PRO Related Events showing too far in advance

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1177030
    Justin
    Participant

    Hi,

    I have created an event that occurs weekly for the next 24 months. When I click on this event, it shows ‘related events’ at the bottom of the page (which is this event recurring in the future). The problem is it isn’t displaying the next dates, it is showing them for 2017 and 2018… How can I make sure it shows the next 3 dates in order?

    #1177339
    Cliff
    Member

    Hi Justin.

    The Related Events display/output is handled by this file: /wp-content/plugins/events-calendar-pro/src/views/pro/related-events.php

    But it actually gets its events from tribe_get_related_posts(), located in /wp-content/plugins/events-calendar-pro/src/functions/template-tags/general.php

    You could filter this function’s results (i.e. keep the same output/display) via tribe_related_posts_args or tribe_get_related_posts, or you could override the output/display (including using a function of your own) via our Themer’s Guide, in which case you could probably use tribe_get_next_event_link(), located in /wp-content/plugins/the-events-calendar/src/functions/template-tags/link.php

    I hope this helps you with your customization!

    #1179737
    Justin
    Participant

    Hi Cliff,

    I’m not very familiar with being able to edit this to get the next events to show.

    If we used “tribe_get_next_event_link()” – where do we need to insert this please?

    #1180046
    Cliff
    Member

    Justin, please give this snippet a shot and see if it does what you want:

    https://gist.github.com/elimn/1e6797dd1a5d8ee666c5

    #1190928
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Related Events showing too far in advance’ is closed to new replies.