• Resolved nvnvnvnvn

    (@nvnvnvnvn)


    In the Maps view, is there a way to add or change the content populated in the balloon pop-up window?

    It sure seems like others would have asked this, but I searched and couldn’t find it. No documentation or FAQs I could find either so it would seem you can’t change it, but that seems hard to believe as well.

    The idea being, for example, if I want to see all garage sales this weekend and I go to map view to see which ones are in areas I want to go to, if I click the balloon, it won’t have much info for me to know or to know how to go find that actual event for more info.

    I seem to missing something, thanks for any help!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • You can modify the text in the balloon but it can only have location information not information about the event.

    You could add a category for garage sales then you could filter the results to only show events near a particular location and that are in the category garage sales.

    Thread Starter nvnvnvnvn

    (@nvnvnvnvn)

    Thank you @joneiseman! That’s what I was seeing, I didn’t phrase my question correctly, thank you for elaborating.

    Would be amazing if there could be a link in the bubble/balloon to take you to the event page for that event, or some other fields. Anything more than the current offering seems very helpful.

    I think my example indicates the need for it, but poorly. You are correct and helpful in answering it the way you did, but if I wanted to see what time the garage sale opened or wanted to see more details about what they had at the garage sale, it would be a little harder to go back and find those specific events….from what I can figure out at this point.

    Thread Starter nvnvnvnvn

    (@nvnvnvnvn)

    I am going to go pro though, regardless. These developers deserve every penny of it.

    • This reply was modified 6 months, 3 weeks ago by nvnvnvnvn.

    There can be multiple events from the same location. That’s why you can’t get the event information on the map balloon. There is a way to loop through all the events using EM_Events::get() to get all the events at this location. Here’s an example of how that could be done:

       echo '<div>'

    // Get the current location's ID
    $location_id = $EM_Location->location_id;
    $additional_balloon_text = "";

    // Define the arguments for our query
    $args = array(
    'scope' => 'future', // Only get events happening in the future
    'location' => $location_id, // Filter by the current location ID
    'orderby' => 'event_start_date', // Order them by start date
    'order' => 'ASC', // In ascending order (soonest first)
    'limit' => 0 // Use 0 to get all future events, or set a number like 5 or 10
    );

    // Fetch the events using our arguments
    $future_events = EM_Events::get($args);

    // Check if any events were found
    if ( count($future_events) > 0 ) {

    // Loop through each event
    foreach ( $future_events as $EM_Event ) {
    $additional_balloon_text .= 'Event Title:' . $EM_Event->event_title;
    if (!empty($EM_Event->event_excerpt)) {
    $additional_balloon_text .= '<br />Excerpt:' . $EM_Event->event_excerpt;
    }
    }
    }
    echo $additional_balloon_text . '</div>';

    To modify the text in the map balloon you would need to create the directory wp-content/plugins-templates/events-manager/placeholders then copy wp-content/plugins/events-manager/plugins/events-manager/templates/placeholders/locationmap.php to that directory then modify the copied file. You would add the above code into that file after line 58.

    Thread Starter nvnvnvnvn

    (@nvnvnvnvn)

    @joneiseman:

    When on the event page, the map pin has a link for “Events” in it. Which clicking on it goes to the page of all events at that location. (i.e. – https://fun-in-phelps.com/events/drop-n-shop/)

    When searching events, the map display pin does not have that Events link in it. How can I get that Events link to show up? (i.e. – https://fun-in-phelps.com/events/) and change display type to map.

    I’ve tried taking what you’ve stated previously, but just not quite getting the expected output. Almost like the events page map is a different file generating it?

    Thank you!

    • This reply was modified 4 months, 2 weeks ago by nvnvnvnvn.
    • This reply was modified 4 months, 2 weeks ago by nvnvnvnvn.
    • This reply was modified 4 months, 2 weeks ago by nvnvnvnvn.
Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.