Here you can assign post or custom posts as location on map.To Create locations using post or custom posts on Leaflet Map , You will need to install WP Leaflet Maps Pro Plugin and activated on your WordPress site for them to work.
How to show Custom Post type Location on map
Step 1: Go to your Custom Post type page Add or Edit post and scroll down to ‘wp leaflet maps pro’ metabox.
Step 2: ‘wp leaflet maps pro’ metabox will appear. Enter relevant information in this window.
Step 3: There will be Following Fields :
- Enter Location : Enter the Name of your location.Type few words and choose your Address.
- Latitude / Longitude : Latitude & longitude will be automatically calculated when you assign Location Address but you can change them.
- Select Categories:Assign a category to your location (optional). You can create categories from Add Marker Category link.
- Location Redirect: You have three options in ‘Location Redirect’ field.
Marker – To display an info window message on marker click.
Post – To redirect to post on marker click.
Custom Link – To redirect to a custom page on marker click. - Select Map : Select your map on which you want to display your post. You can create map from Add Map link.
and you’re done
Step 3: Click on Save/Update Post. The Post locations you created will be display on map.