Shortcode for events list – hide event after start date reached

Home Forums Calendar Products Events Calendar PRO Shortcode for events list – hide event after start date reached

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1232275
    Chris
    Participant

    Is it possible to remove an event from a list using the events list shortcode once it reaches or passes the event start date? If you could direct me to the function running this I would be grateful.

    Events on my site run for up to 4 weeks so new events need to be listed as soon as one begins.

    Cheers.

    #1233244
    Cliff
    Member

    Hi, Chris.

    Could you please provide a link to view this in action? Also, if you share an annotated screenshot or video screen capture, it might help communicate what you’re seeing and what exactly the issue is so I can do my best to help.

    #1233729
    Chris
    Participant

    Hi thanks for getting back to me.

    I currently use the Avada shortcade to output a list of or the next single event available:

    [fusion_events cat_slug="courses" number_posts="1" columns="1"/]

    I want the list to only show future events – not those currently running. Could I use the below function but perhaps change the ‘_EventEndDate’ to ‘_EventStartDate’ to override the above shortcode default behaviour of showing an event in the list until the end date is reached?

    http://pastebin.com/uHCEjEiB

    Cheers

    • This reply was modified 7 years, 3 months ago by Chris.
    #1234903
    Cliff
    Member

    We do not provide support for third-party themes or plugins that integrate with ours.

    However, I did dig into that shortcode and found its logic in this file: /wp-content/plugins/fusion-core/shortcodes/class-fusion-events.php

    Their shortcode does not use tribe_get_events() and I believe that means your tribe_events_pre_get_posts hook is not firing.

    Also, it’s an action hook, and your code is “add_filter”.

    So, multiple things going on–using Avada and trying to do custom coding–neither of which we provide support for, per our Scope of Support / Terms.

    Thank you very much for your understanding.

    If you need some coding help, you may want to ask your personal developer, Avada support, or reference our documentation and list of known customizers.

    #1251136
    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 ‘Shortcode for events list – hide event after start date reached’ is closed to new replies.