This article covers Create a Map and Marker Using Custom Fields with the WP Google Maps Pro Add-on. This feature requires WP Google Maps Pro. This documentation is current for WP Google Maps version 6.
Note: You’ll need to edit a page/post, enable custom fields at the top of the page and then enter in a map_id, lat, and lng, it will then render a map at the bottom of the page.
With the latest versions of WP Google Maps Pro you can call a Map and Marker on a Post or Page using WordPress Custom Fields.
Open the Post or Page where you want to display the Map and Marker. At the top of the Edit Page (or Edit Post) panel, click Screen Options. Then click the checkbox for Custom Fields to enable Custom Fields for this Page.
Scroll down to the Custom Fields section and click the Enter new link.
Add new Custom Fields for each of the following (assuming this is the first time you’ve used this functionality):
- Name: lat
- Value: Latitude of Marker to center on Map
- Name: lng
- Value: Longitude of Marker to center on Map
- Map ID
- Name: map_parent_id
- Value: Map ID of Map you wish to use. This will allow you Map to take on all the Map Settings from that Map (width, height, Map Type, Zoom Level, etc…) If no ID is specified, the default is the first Map in the database.
Publish your Post or Page and then click View. Your Marker will be centered on the displayed Map.