Business · Gutenberg
Location Cards block for WordPress
Multi-location business directory grid. Each card shows address, phone, email, business hours snippet, and a directions link.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Multi-location business directory grid. Each card shows address, phone, email, business hours snippet, and a directions link.
Inspector panels on this block: Display Settings, Layout, Locations. Those titles come from index.js, not from a shared template.
Behavior controls: “Card Style” options: Card (border + shadow), Flat (border only), Ghost (no border); “Hover Effect” options: Lift (shadow), Border Glow, None; “Image Aspect Ratio” options: 16:9, 4:3, 1:1, 3:2.
Where to find it
Gutenberg inserter → Business → search “Location Cards” (block name `blockenberg/location-cards` in block.json). Style it in the sidebar after insert.
How to use Location Cards block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Location Cards”, insert it. Category: Business.
- Configure inspector controls that exist on this block. Open Display Settings. Set “Show Location Image”, “Show Phone Number”, “Show Email”, “Show Website”.
- Check the published page. The view script reads HTML data attributes: data-address. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Show Location Image | On/off toggle in the inspector. On by default. Saved as `showImage`. |
| Show Phone Number | On/off toggle in the inspector. On by default. Saved as `showPhone`. |
| Show Email | On/off toggle in the inspector. On by default. Saved as `showEmail`. |
| Show Website | On/off toggle in the inspector. Off by default. Saved as `showWebsite`. |
| Show Hours | On/off toggle in the inspector. On by default. Saved as `showHours`. |
| Show Directions Button | On/off toggle in the inspector. On by default. Saved as `showDirectionsLink`. |
| Directions Button Label | Text field in the inspector. block.json default: Get Directions. Saved as `directionsLabel`. |
| Columns (Desktop) | Numeric range control in the inspector. Range 1–4. block.json default: 3. Saved as `columns`. |
| Columns (Tablet) | Numeric range control in the inspector. Range 1–3. block.json default: 2. Saved as `columnsTablet`. |
| Columns (Mobile) | Numeric range control in the inspector. Range 1–2. block.json default: 1. Saved as `columnsMobile`. |
| Gap Between Cards (px) | Numeric range control in the inspector. Range 0–80. block.json default: 24. Saved as `gap`. |
| Card Style | Select control; the chosen value is saved on the block. Options: Card (border + shadow); Flat (border only); Ghost (no border). block.json default: card. Saved as `cardStyle`. |
| Hover Effect | Select control; the chosen value is saved on the block. Options: Lift (shadow); Border Glow; None. block.json default: lift. Saved as `hoverEffect`. |
| Image Aspect Ratio | Select control; the chosen value is saved on the block. Options: 16:9; 4:3; 1:1; 3:2. block.json default: 16/9. Saved as `imageRatio`. |
| Card Border Radius | Numeric range control in the inspector. Range 0–40. block.json default: 16. Saved as `cardRadius`. |
| Card Padding | Numeric range control in the inspector. Range 8–60. block.json default: 24. Saved as `cardPadding`. |
| Image Border Radius | Numeric range control in the inspector. Range 0–40. block.json default: 0. Saved as `imageRadius`. |
| Button Border Radius | Numeric range control in the inspector. Range 0–40. block.json default: 8. Saved as `btnRadius`. |
| Padding Top (px) | Numeric range control in the inspector. Range 0–200. block.json default: 64. Saved as `paddingTop`. |
| Padding Bottom (px) | Numeric range control in the inspector. Range 0–200. block.json default: 64. Saved as `paddingBottom`. |
| Name | Text field in the inspector. |
| Street Address | Text field in the inspector. |
| City | Text field in the inspector. |
| State / Province | Text field in the inspector. |
| ZIP / Postcode | Text field in the inspector. |
| Country | Text field in the inspector. |
| Phone | Text field in the inspector. |
| Text field in the inspector. | |
| Website | Text field in the inspector. |
| Google Maps URL | Text field in the inspector. |
| Hours Snippet | Text field in the inspector. |
What the front-end script actually does
- The view script reads HTML data attributes: data-address.
- An IntersectionObserver starts work when the block enters the viewport.
When this is the right block
- Multi-location business directory grid. Each card shows address, phone, email, business hours snippet, and a directions link — that is the job of Location Cards, not a generic content block.
- Use it when you need the editor control labeled “Show Location Image”, which exists on this block’s inspector.
- Inserter grouping: company, service, and operations pages.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Location Cards block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Location Cards”. It sits under Business. After insert, open Display Settings and set “Show Location Image”, “Show Phone Number”, “Show Email”, “Show Website”.
What makes Location Cards different from other Blockenberg blocks?
Multi-location business directory grid. Each card shows address, phone, email, business hours snippet, and a directions link. Inspector labels on this block include “Show Location Image”, “Show Phone Number”, “Show Email”, “Show Website”.
Is the Location Cards Gutenberg block free?
Yes. Location Cards ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Location Cards to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Display Settings, Layout, Locations).
Related business blocks
About Section
Ready-made About Us section with split image/video + text layout, optional company stats row, badge label, CTA buttons, and full background/color controls.
Address Card
Business address card with contact details, opening hours, and optional map link.
App Screenshot
SaaS/app product screenshot section with annotated callout points, device frame, heading, subtext, and CTA. Perfect for software landing pages.
Author Box
Display a blog author profile card with avatar, name, bio, role and social media links.
Author Profile
Extended author bio card with avatar, name, role, bio, stats, and social links.
Avatar Group
Overlapping stack of user or team avatars with an optional +X counter bubble.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Location Cards from the Gutenberg inserter.