Home › Forums › Calendar Products › Events Calendar PRO › Custom Map date no longer works
- This topic has 8 replies, 3 voices, and was last updated 7 years, 8 months ago by Lars.
-
AuthorPosts
-
August 29, 2016 at 8:33 am #1157078LarsParticipant
Hi,
We have been using this code to set a custom Map header date but with latest update it longer works. Why?
// Custom Events Map View Title add_filter( 'tribe_get_events_title', 'change_map_view_title', 15 ); function change_map_view_title( $title ) { $look_for = 'Events for October 24 - October 28'; if ( false === strpos( $title, $look_for ) ) return $title; return 'Events for Danish Maritime Days – 24-28 October 2016'; }
August 29, 2016 at 11:04 pm #1157428Geoff B.MemberGood evening Lars and welcome back!
Thank you for reaching out to us.
We are sorry to hear about the custom Map header code no longer working on your site.
I would love to help you with this topic.As a first troubleshooting step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?
https://theeventscalendar.com/knowledgebase/sharing-sys-info/
Furthermore, to put this in context. Could you please send me a copy of your WordPress theme / child theme in a .zip file link (via Dropbox or Google Drive) so that I can run some tests on my end ?
Best regards,
Geoff B.
August 30, 2016 at 1:51 am #1157460LarsParticipantThis reply is private.
August 30, 2016 at 3:09 pm #1157849Geoff B.MemberGood evening Lars,
Thank you for the system information.
Based on what I am seeing, it is likely that your custom snippets simply needs updating.
Could you please send me a copy of your WordPress theme and child theme in a .zip file link (via Dropbox or Google Drive) so that I can run some tests on my end while having complete access to all of your theme’s code ?Best regards,
Geoff B.
August 30, 2016 at 3:39 pm #1157857LarsParticipantHi,
That seems rather excessive. You wrote the snippet you wouldn’t you be able to modify on your own demo?
August 31, 2016 at 9:58 pm #1158558Geoff B.MemberGood evening Lars,
Thank you for writing back.
To be transparent with you, I was merely trying to be helpful here.
According to our archives, it appears you were actually the one that wrote that script initially: https://theeventscalendar.com/support/forums/topic/inserting-title-and-text-above-each-view/#post-945290
Furthermore, the way that snippet is written, you are using hardcoded values.
As such, the custom title would only be triggered upon a very specific condition (if the ‘Events for October 24 – October 28’ string is found).In any case, as you know, the scope of our support is mostly to get our customers started on the right track and to help them in case of issues.
We unfortunately do not provide complete support for customization.
With that in mind, if you want to rework your snippet, there are a couple of potential things I would consider:
- Try hooking to ‘tribe_events_title’ instead of ‘tribe_get_events_title’.
- The $look_for variable might be breaking with the way we display titles. Check out what you find in the debugger with a breakpoint.
Best regards,
Geoff B.
September 1, 2016 at 1:57 am #1158634LarsParticipantOk, we solved this.
September 1, 2016 at 9:37 am #1158892Geoff B.MemberGood afternoon Lars,
I’m glad you were able to figure things out.
You are welcome back on our support forums any time.
For now, I am going to close this thread.
Have a great week!
Geoff B.
-
AuthorPosts
- The topic ‘Custom Map date no longer works’ is closed to new replies.