Expired Events – How to configure

Home Forums Calendar Products Events Calendar PRO Expired Events – How to configure

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1628090
    Justin Tippett
    Participant

    Hi guys, possibly a silly question but I’m really not sure how you are supposed to manage events that have expired. Of course, Google indexes our events (as we want) so there are times when someone will click on an event that is appearing in Google search results that has clearly expired. Seems to be there are two results:

    1. When they go to event that has expired there is some very small text that says ” This event has passed” (refer image). How or where can this be customised to (A) make it stand out more and (B) ideally offer them a link to search for more events. E.g. To search for the latest events click here.

    2. The other option would just be to direct the click to the main calendar. E.g. For Expired events automatically redirect people to the Events Calendar month or list view or perhaps an URL/Page you choose when you can customise a message however you want. Don’t see this option anywhere? Is this possible? What is best practice?

    Look forward to your help.

    #1629356
    Sky
    Keymaster

    Hi there,

    If you’d like to customize the contents of the message that shows on past events, you can use the following snippet:


    add_filter( 'tribe_events_set_notice', 'my_tribe_events_set_notice_past_events', 2, 100 );
    function my_tribe_events_set_notice_past_events( $notice, $key ) {
    if ( 'event-past' === $key ) {
    $notice = 'This is my custom message for this one';
    }
    return $notice;
    }

    Just paste that in your theme’s functions.php file or in a functionality plugin, and change the content as needed.

    You may be able to make past events redirect somewhere with some customization. However, I don’t have a snippet handy for that one.

    Hope that helps! Please let me know if you have any additional questions about this.

    Thanks,
    Sky

    #1629633
    Justin Tippett
    Participant

    Hi Sky,

    I tried adding the snippet directly to the functions.php file however it
    just kept crashing my site.

    #1630433
    Sky
    Keymaster

    Hi again,

    So sorry! I left a closing end off of the filter. I updated the snippet above, and tried it out to make sure it was working.

    Let me know if that works for you now.

    Thanks,
    Sky

    #1632900
    Justin Tippett
    Participant

    Awesome, thanks Sky that works. Could you also advise where I can change the colour background? Right now its a very pale blue so wanted to change it to a red or something that stands out more.

    #1633148
    Sky
    Keymaster

    Hi again,

    Unfortunately, it looks like there is no unique identifying class for specific notifications. Your only option would be to change the color of all the notifications.

    To do that, you could use this CSS:


    .tribe-events-notices {
    background-color: red!important;
    }

    Hope that helps!

    Thanks,
    Sky

    #1633544
    Justin Tippett
    Participant

    Perfect, thanks Sky that worked great. Be great to see all of this added into the options one day to make it really easy for people to customise it.

    #1633561
    Justin Tippett
    Participant

    Hi Sky, sorry to be a pain but how can I change the font colour for this as well? Obviously depending on the colour you choose for the background can have an issue with being able to read the text.

    Here is a link on my site as well if that helps.

    https://cxcentral.com.au/event/digital-government-and-customer-experience-series-2018/

    #1634334
    Justin Tippett
    Participant

    Hi, just giving this a bump so it gets noticed. Thanks.

    #1634536
    Sky
    Keymaster

    Hi again,

    Glad that snippet worked for you!

    As I mentioned in the other support thread, we are limited in how much support we can provide for customizations. To figure out which element to target, just use your browser inspector to view the element, and you can see which current styles need to be overridden.

    Thanks,
    Sky

    #1647314
    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 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Expired Events – How to configure’ is closed to new replies.