Digital Sovereignty for everyone

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. Only statuses the current viewer can see are used (see below).
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.

Which statuses are shown

Since 1.30.3 the Post status setting is filtered for whoever is viewing the page. A status is used when it is public for that viewer. The LH status plugins (lh-membership, lh-restricted-post-status and others) make their statuses public only for people allowed to see them, so a map set to publish,member shows member posts to members and only published posts to everyone else. private is used only for users who can read private posts. Draft, pending, scheduled, trashed and unregistered statuses are never shown. If none of the listed statuses is visible to the viewer, the map renders nothing rather than falling back to published posts.

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

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.