Helping Organisations get organised!

Map block

The LH Places Map block (lh-places/map, in the Embed category) draws geo-tagged posts on a Leaflet map. It is rendered on the server, works from any post type, and supports wide and full alignment. Each marker’s popup links to its post and shows its address.

Setting Default What it does
Post type post One or more post type slugs, comma-separated. Left blank, every post type is searched.
Post status publish One or more statuses, comma-separated. Custom statuses work.
Posts 10 How many posts to plot.
Category none Category ID.
Post parent none Only children of this post.
Specific posts none Comma-separated post IDs.
Height 400px Any CSS height. The width always fills the container.
Zoom 13 The exact zoom for a single place. With several places the map first fits them all, and only zooms out further than this if it has to.
Layer street Starting layer, street or satellite. Viewers can switch between them.
Show numbered list on With several places, numbers the markers and lists the posts below the map. The list works without JavaScript.

Street tiles come from OpenStreetMap and satellite tiles from Esri World Imagery, so no API key is needed. In the editor preview, a block that matches no posts shows a placeholder explaining why. On the public site it renders nothing.

The [lh_places_geomap] and [lh_places_geojson] shortcodes were removed in 1.24. Use this block, or the REST API for raw GeoJSON.

If you like this plugin please consider making a donation to further development