The Events Manager plugin by Marcus Sykes is one of the best solutions available for managing events on your WordPress website. It is simple for the average user to setup and developers will love its flexibility.
However, modifying the Google Map integration to look just the way you want it can be a headache. Here’s a quick look at how to adjust the map’s default zoom level, remove the text bubble, and center the map on the event’s location marker.
To accomplish all these tasks you’ll have to add some jQuery to your site.
If it doesn’t already exist, start by creating a folder called “js” in your theme folder. This is purely for organization. In your “js” folder, create a text file called “events-manager-map.js” and paste it inside this code:
This snippet sets the Google Map’s zoom level to 4, closes the text bubble, and re-centers the map on the marker. The script will not run on your page until you tell WordPress to enqueue it. Add this code to your theme’s functions.php file to make it happen.
If you would like to change the style of the map itself, be sure to check out Snazzy Maps and follow the instructions here for map styling.
Please comment below if you have any other tips for modifying Event Manager’s map integration!
Leave a Reply