Home › Forums › Calendar Products › Events Calendar PRO › Recurring event text
- This topic has 3 replies, 2 voices, and was last updated 12 years ago by
Brook.
-
AuthorPosts
-
April 12, 2014 at 10:02 pm #131909
wolferman
ParticipantFirst let me say I am extremely happy with The Events Calendar, at least thus far. I was using another calendar plugin (which shall remain nameless to protect the guilty) until it started rampantly chewing up CPU resources – so much so that my site host shut me down several times because I was surpassing their user limits. It took me a while to figure out that the calendar was the culprit. In any case, I settled on The Events Calendar (and Events Calendar Pro) as an alternative and have been working diligently to hammer it into the style I want. Because of your excellent documentation and the ability to customize the code, I have been able to do so with relative ease.
Now for my question. Please look at the single-event example here: http://rockymtntechline.com/event/new-tech-denver-meetup/2014-04-17/. In the gray box containing the event schedule information, just below the “WHEN:” information line there is a line that says “Recurring Event (See All).” That’s okay, because it is indeed a recurring event. But rather than that particular wording, I would like it to say something like, “Occurs monthly on the third Thursday” or something to that effect.
I did find the function called “tribe_get_recurrence_text()” that indeed provides the text I would like, and I can easily add it in the proper place by customizing the single-event code. (As per your documentation, I am overriding a number of PHP and CSS files in my own override folders, so as not to adulterate the original code. BTW this is a great convenience and a terrific idea on your part.)
However, while I can produce the recurrence text line, I can’t figure out how to hide the original “Recurring Event (See All)” line. In the code, I only see the following function: “echo tribe_events_event_schedule_details();”. Removing that code, of course, removes the date information as well. Naturally, I don’t want to do that; I just want to remove the “Recurring Event” text and replace it with the “tribe_get_recurrence_text()” line.
My guess is that the “tribe_events_event_schedule_details()” function is automatically calling the “Recurring Event” line that I want to hide. But I don’t see any reference to that in your code documentation online.
So: How can I go about hiding this line so I can just use the “tribe_get_recurrence_text()” line instead? Any help will be much appreciated.
FYI, you can see the events calendar listing page (which I have defaulted to Photo view) at http://rockymtntechline.com/events/. From there you can click on any of the events. Currently, there are only a few recurring events listed, including the example cited above.
Thanks.April 14, 2014 at 11:13 pm #132810Brook
ParticipantHowdy wolferman,
Good questions. I see you do lots of research before asking!
First of all, if you ever do want to change the text “Occurs monthly on the third Thursday” keep an eye out for the input field labeled “Recurrence Description” on the Add/Edit event screens. It will allow you to change that text on a per event basis.
If you want to completely hide the see all events link there are two ways, the easy/hacky way and the hard one. Easy way, use CSS. Hard way, hook into the PHP filter “tribe_events_recurrence_tooltip” and regex search/replace the output for
<a [^>]>(See All)</a>(might need some tweaking) then replacing that with nothing: ”.Does that all make sense? Did that help? Please let me know. Cheers!
– Brook
April 15, 2014 at 5:34 pm #133626wolferman
ParticipantPerfect! I almost feel a bit foolish. The CSS route was so easy; I simply added a “display:none” line for the “.tribe-single-event .recurringinfo” class in my css override file. Then I inserted the “get_recurring_text()” function in the PHP single event file, did a little tweaking and voila … looks just the way I wanted. (I also found “Recurrence Description” field, which I had previously overlooked. So now I can insert exactly the text I want.) Thanks a heap for the quick response. Now, I’ll have to think up harder questions for you :). If you want to check out the new recurrence text, look at http://rockymtntechline.com/event/cocoaheads-denver/2014-05-13/. Thanks again! Eric
April 17, 2014 at 11:31 pm #135765Brook
ParticipantI am really glad that worked Eric! When you think up those harder questions let us know. Cheers! 🙂
– Brook
-
AuthorPosts
- The topic ‘Recurring event text’ is closed to new replies.
