customize map pop text

Home Forums Welcome! Pre-Sales Questions customize map pop text

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1061409
    stackedd
    Participant

    Hi,

    I’d like to alter the content of the popup that is seen when you click the map location icon on the map.
    Currently is displays: Event: <event title w/url> and Address.

    I’d like to override those.

    how do ya do it?

    Aaron

    #1061778
    George
    Participant

    Hey Aaron,

    Unfortunately, we cannot help much with customizations. See the “Product Support” section of this page for more information → http://theeventscalendar.com/terms

    Now, I only mention that to set your expectations and such – I’m still happy to try and help here! 🙂

    You can modify the labels in the tooltips to anything you’d like with a bit of custom code in your theme’s functions.php file. These labels are “Event:” and “Address:” by default. To change that to “Show:” and “Location:”, for example, you could add code like this to your theme’s functions.php file:

    if ( function_exists( 'Tribe_ECP_Load' ) ) {
    /**
    * Modify 'Event:' and/or 'Address:' text in Map View tooltips.
    *
    * @return array
    */
    function tribe_support_1052594( $data ) {

    if ( tribe_is_map() ) {
    $data['map_tooltip_event'] = 'Show:'; // Default is 'Event: '.
    $data['map_tooltip_address'] = 'Location:'; // Default is 'Address: '.
    }

    return $data;
    }

    add_filter( 'tribe_events_pro_localize_script', 'tribe_support_1052594' );
    }

    If you want to remove these labels altogether, you can do so by making the values in the above code equal to just an empty string. Like this:


    $data['map_tooltip_event'] = '';
    $data['map_tooltip_address'] = '';

    Changing other content inside the tooltips is unfortunately much harder. But I hope this helps with modifying the labels!

    Best of luck with further customizations on your site.

    Sincerely,
    George

    #1078212
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘customize map pop text’ is closed to new replies.