rwmb_the_value( 'hba_event_map', $args );
prints my map.
rwmb_get_value( 'hba_event_map', $args );
gives me an array of coordinates.
I want to render the map with a shortcode, which means I need to return it, not echo it.
So I did this:
ob_start();
echo '<p>';
rwmb_the_value( 'hba_event_map', $args );
echo '</p>';
$map = ob_get_contents();
ob_end_clean();
return $map;
This seems to work, but then when I use my shortcode, and then put something after it, the gutenberg editor includes the thing after it inside the anchor tag for the map.
You can see this here: https://heartsideb.sg-host.com/event/community-meetup-at-two-beards-deli/
There's a phone number after the map. The phone number doesn't have a link on it, it's somehow getting the link from the map.
How can I prevent this?