Custom Map date no longer works

Home Forums Calendar Products Events Calendar PRO Custom Map date no longer works

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1157078
    Lars
    Participant

    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';
    }
    #1157428
    Geoff B.
    Member

    Good 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.

    #1157460
    Lars
    Participant

    This reply is private.

    #1157849
    Geoff B.
    Member

    Good 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.

    #1157857
    Lars
    Participant

    Hi,

    That seems rather excessive. You wrote the snippet you wouldn’t you be able to modify on your own demo?

    #1158558
    Geoff B.
    Member

    Good 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:

    1. Try hooking to ‘tribe_events_title’ instead of ‘tribe_get_events_title’.
    2. 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.

    #1158634
    Lars
    Participant

    Ok, we solved this.

    #1158892
    Geoff B.
    Member

    Good 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.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Custom Map date no longer works’ is closed to new replies.