Change Notice Messages

Home Forums Calendar Products Events Calendar PRO Change Notice Messages

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1274794
    jasonmcartor
    Participant

    Hello,

    I’m wanting to change a few of the notices that appear because of the calendar. I referenced this support feed, https://theeventscalendar.com/support/forums/topic/change-the-text-for-tribe_events_the_notices-on-events-that-have-passed/ , and it’s exactly what I’m needing done. I’ve added this to my functions file and it’s not changing, is there something else that should be added?

    Thank you!

    #1275551
    Cliff
    Member

    Hi, Jason. Thanks for linking there.

    I’d suggest replacing tribe_events_the_notices with tribe_the_notices in that snippet and see if that works.

    Please let me know how this goes for you.

    #1275780
    jasonmcartor
    Participant

    I added it and at first, it didn’t change anything but we have changed the term “Event” to “Clinic & Camp” so below is what I’m using. This just caused the notice to disappear completely.

    add_filter( ‘tribe_the_notices’, ‘customize_notice’, 10, 2 );
    function customize_notice( $html, $notices ) {
    if( stristr( $html, ‘This clinic & camp has passed.’ ) ) {
    $html = str_replace( ‘Pre-registration is closed for this clinic/camp.’, $html );
    }

    return $html;
    }

    #1275831
    Cliff
    Member

    I’m glad you got it sorted out.

    Thanks for sharing what worked for you.

    #1275936
    jasonmcartor
    Participant

    Sorry, maybe I worded that incorrectly. It made the notice disappear completely which is not the result I’m looking for. I’m just needing to change that appears in the notice.

    #1276030
    Cliff
    Member

    These snippets should work:

    1) Remove the notice from display:

    https://gist.github.com/geoffgraham/e297c0ecd141705d0e2637bfe78202d6

    2) Replace/Customize the notice that is displayed:

    https://gist.github.com/geoffgraham/953930aefc0aa0fa2d28

    Please let me know how this goes for you.

    #1276038
    jasonmcartor
    Participant

    I’m not wanting to remove any of my notices, only modify them. The bottom snippet is what I originally used and it did not work. I have changed the Event Label from “Event” to “Clinic & Camp”. Does that have anything to do with the snippet you sent not working?

    #1276066
    Cliff
    Member

    Jason, I tested the 2nd snippet, and it worked without any modifications.

    Here’s a screenshot: https://cl.ly/1a0O0j073z2F

    Would you be able to share a screenshot of what you’re trying to customize?

    #1286736
    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 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Change Notice Messages’ is closed to new replies.