In this tutorial, you will learn how to load WordPress posts to maps.
Create a new map in MapSVG.
Go to the Database tab and click on the Data Sources button in the toolbar:
On the next screen, click on the + (Add new data source) button, choose Data source: WP Posts, fill in the fields, and select the post type you want to connect to the map:
Click OK. Now, click Connect button next to the name of your new data source.
The view goes back to the table view, which is empty because we didn't add any posts to this map yet:
Click on the "Save" button after the previous step to store the connection to the new data source in the map settings.
Don't close the tab with the map! In a new tab, go to WP Menu / Pages / Add new. Enter the post title, then
click on the Marker icon in the top toolbar to load the map:
Enter an address in the search field below the map and then click on the address in the drop-down to add a marker.
You can click on the marker button to change the marker image:
Publish the post and then go back to MapSVG.
If it's already opened in another tab, reload the page to see the post:
And if you have a Custom Post Type that you prefer to edit with a Classic Editor - MapSVG supports it too:
The data (for both Gutenberg and Classic Editor) is synchronized in both ways:
If you change the post location on the post editing screen, it updates automatically in MapSVG.
If you delete the marker on the post editing screen, the post disappears from MapSVG.
If you change the post location in MapSVG, its location is updated on the post editing screen.