The new MapBox plugin for Wordpress makes it quick and easy to embed maps from MapBox Hosting into a Wordpress site. Whether you design your own custom maps in TileMill and host them with our easy to use map hosting service, or use existing map layers from the open source tileset library, the MapBox plugin makes it easy get maps onto your Wordpress site.
If you already have a Wordpress site, you can install the plugin as usual. Once you’ve done so, you can embed MapBox maps into your site using one of two ways — either by using the
mapbox shortcode or by copying, pasting, and embedding the code directly from MapBox Hosting into the editor. For this second option, simply visit MapBox Hosting and select the map you want to embed from your own collection or from the hundreds of publicly available maps. Click the “embed” button on the map to reveal the embed panel, and adjust the map so it appears exactly as you want it to embed on your site. You can adjust the height and width of the map, as well as select which controls and other options you want to include in your embed.
When you’re happy with the way the map looks, just copy the ‘embed code’. On your WordPress site, add a new post or edit an existing one, and switch the editor to “HTML” mode. Paste the embed code where you’d like the map. Save, then view your post and enjoy the map!
When you save the post, the MapBox plugin converts the embed code into a Wordpress shortcode. This
mapbox shortcode can take several options, all of which are optional, that you can tweak to make small changes to the embedded map. The full list of options is explained on the plugin page.
To get started making your own custom maps, download the open source map-making tool TileMill, which allows you to either host your maps with MapBox Hosting or on your own. Documentation and support for both are available at support.mapbox.com.