WordPress
patterns/map-1-dynamic.php
✔ Custom
- Use: showing where a set of places lies, when visitors look for them by area rather than by name.
- Not for one or two addresses, which belong in Contact Information, and not when many markers sit close together and would overlap.
- Source: the posts of the query with a location from the Map plugin.
- Content: an optional topic, a heading and an optional subline; every post needs a location, or it stays off the map. Set the post type in the query.
This pattern contains dynamic content and may be displayed incompletely in the live preview. Check the figma-preview to get a feeling how it looks with real content.
patterns/map-2-dynamic.php
✔ Custom
- Use: many places, or places close together, whose markers would overlap one by one, so nearby markers merge into a number until the visitor zooms in.
- Not for a handful of places far apart, where single markers show each one directly.
- Source: the posts of the query with a location from the Map plugin.
- Content: an optional topic, a heading and an optional subline; every post needs a location, or it stays off the map. Set the post type in the query; grouping needs OpenStreetMap or a custom map, since Google Maps shows every marker on its own.
This pattern contains dynamic content and may be displayed incompletely in the live preview. Check the figma-preview to get a feeling how it looks with real content.
patterns/map-3-dynamic.php
✔ Custom
- Use: places that some visitors look up by name and others by area, with one view on screen at a time and a button to switch.
- Not when visitors should see names and places at the same time.
- Source: the posts of the query, with locations from the Map plugin.
- Content: an optional topic, a heading and an optional subline; every post needs a location and a title that names its place, since the list shows titles only. Set the post type in the query.
This pattern contains dynamic content and may be displayed incompletely in the live preview. Check the figma-preview to get a feeling how it looks with real content.
patterns/map-4-dynamic.php
✔ Custom
- Use: a short set of places to browse by name and by area at the same time.
- Not for long sets, where the list grows far taller than the map.
- Source: the posts of the query, with locations from the Map plugin.
- Content: an optional topic, a heading and an optional subline; up to ten posts, each with a title, a hand-written excerpt and a location. Set the post type in the query.
This pattern contains dynamic content and may be displayed incompletely in the live preview. Check the figma-preview to get a feeling how it looks with real content.
patterns/map-5-dynamic.php
✔ Custom
- Use: places on a map that visitors narrow down by one criterion, such as a type or a region, with a button to switch to a list of them.
- Not for several criteria at once, and not when names and places should be in view at the same time.
- Source: the posts of the query, via the Filter and Map plugins.
- Content: a heading that names what visitors can filter; every post needs a landscape featured image in the same ratio as the others, since the teaser does not crop it, a hand-written excerpt, a category and tags and a location; the query sets how many appear and the grid how many columns; one taxonomy of up to about ten terms with short names. Set the post type and taxonomy before publishing; until then it stays empty.
This pattern contains dynamic content and may be displayed incompletely in the live preview. Check the figma-preview to get a feeling how it looks with real content.
Figma
Docs
- These patterns need the plugin WP Design System – Map. The theme offers them only while the plugin is active. map-5-dynamic also needs the plugin WP Design System – Filter; choose the taxonomy to filter by in the filter’s Filter groups panel.
- Under Settings › Maps, choose the post types that get a location box, and set the same post type in the pattern’s Query Loop. Posts without a location stay off the map.
- The map shows every post of the query that has a location; the number of posts per page limits only the list.
- Every marker is a button whose dialog works with the keyboard, and a skip link leads past the map. A map alone is still hard to use for many visitors: where finding a place matters, choose a variant with a list.
- Grouping nearby markers works with OpenStreetMap or a custom map, not with Google Maps. Google Maps needs an API key and, depending on the site, consent through a tool such as Borlabs Cookie.
