Home › Forums › Calendar Products › Events Calendar PRO › Change Notice Messages
- This topic has 9 replies, 2 voices, and was last updated 8 years, 11 months ago by
jasonmcartor.
-
AuthorPosts
-
April 26, 2017 at 10:08 am #1274794
jasonmcartor
ParticipantHello,
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!
April 27, 2017 at 8:04 pm #1275551Cliff
MemberHi, 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.
April 28, 2017 at 7:09 am #1275780jasonmcartor
ParticipantI 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;
}April 28, 2017 at 9:07 am #1275831Cliff
MemberI’m glad you got it sorted out.
Thanks for sharing what worked for you.
April 28, 2017 at 9:45 am #1275936jasonmcartor
ParticipantSorry, 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.
April 28, 2017 at 1:02 pm #1276030Cliff
MemberThese 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.
April 28, 2017 at 1:27 pm #1276038jasonmcartor
ParticipantI’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?
April 28, 2017 at 2:21 pm #1276066Cliff
MemberJason, 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?
May 20, 2017 at 9:35 am #1286736Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Change Notice Messages’ is closed to new replies.
