Image Hotspot
Turn any image into an interactive map: pins, circles and rectangles with tooltips, built and positioned in a visual editor inside WordPress.
1. Overview
Image Hotspot adds a Image Hotspots menu to your WordPress admin. Each entry there is one “map”: an image plus the markers you place on it. Every marker can carry a title, a description and a link. When the map is finished you copy a shortcode and paste it wherever the map should appear.
- Visual drag-and-drop editor — no coding at any point.
- Three marker types: pin, circle and rectangle.
- Tooltips open on click or on hover, in a dark or light theme.
- Positions are stored as percentages, so maps stay correct on every screen size.
- Markers are real buttons: reachable by keyboard, closable with Esc.
- CSS and JavaScript load only on pages that actually contain a map.
- No external services, no tracking, and no jQuery on the front end.
2. Requirements
| Item | Minimum |
|---|---|
| WordPress | 5.8 or newer |
| PHP | 7.4 or newer |
| Browser | Any current version of Chrome, Firefox, Safari or Edge |
| Theme | Any — the plugin only styles its own elements |
3. Installation
From the WordPress admin
- Go to Plugins → Add New → Upload Plugin.
- Choose
image-hotspot.zipand click Install Now. - Click Activate Plugin. A new Image Hotspots menu appears in the sidebar.
By FTP
- Unzip the archive on your computer.
- Upload the
image-hotspotfolder to/wp-content/plugins/. - Activate the plugin from Plugins in the admin.
documentation folder. If you install by FTP, upload only the image-hotspot folder.4. Quick start
- Go to Image Hotspots → Add New Map and give the map a name (this name is internal — visitors never see it).
- Click Select image and pick an image from the media library, or upload a new one.
- Click + Pin, + Circle or + Rectangle. The marker appears on the image and is selected automatically.
- Drag the marker to the right spot. With a shape, drag the small square at its bottom-right corner to resize it.
- Fill in Title, Tooltip text and, if you need one, a Link in the panel on the right.
- Repeat for every marker, then click Publish.
- Copy the shortcode from the How to display this map box in the sidebar and paste it into any post or page.
5. The editor
Toolbar
| Control | What it does |
|---|---|
| Select image | Opens the media library and sets the map image. Changing the image keeps the markers where they are. |
| + Pin / + Circle / + Rectangle | Adds a marker in the middle of the image. Disabled until an image is chosen. |
| Open on | Whether tooltips open on Click or on Hover. |
| Theme | Dark or light tooltips. |
| Pulse pins | Adds a gentle pulsing ring to pins so they attract attention. |
Canvas
The canvas is a live preview: what you see is what the visitor gets. Click a marker to select it, drag it to move it, and drag the handle at its bottom-right corner (shapes only) to resize it.
Keyboard shortcuts
| Key | Action |
|---|---|
| ← → ↑ ↓ | Nudge the selected marker by 0.5%. |
| Shift + arrows | Nudge by 2%. |
| Delete or Backspace | Delete the selected marker (asks for confirmation). |
| Esc | Deselect. |
Details panel
| Field | Purpose |
|---|---|
| Title | Bold heading of the tooltip. Also used as the marker’s accessible label. |
| Tooltip text | Description shown under the title. Basic HTML such as <strong>, <em> and <a> is allowed. |
| Link | Optional URL. With a title or text present it appears as a “Learn more” link; on its own it makes the whole marker clickable. |
| Open link in a new tab | Adds target="_blank" with rel="noopener noreferrer". |
| Color | Colour of that single marker — and of its “Learn more” link. |
6. Hotspot types
| Type | Best for | Notes |
|---|---|---|
| Pin | Pointing at a spot: a room, a product feature, a person. | Fixed pixel size, so it stays crisp and tappable at every screen width. |
| Circle | Round areas: a lake, a logo, a face. | Resizable; width and height are independent, so it can be an oval. |
| Rectangle | Rectangular areas: a building, a table cell, a section of a diagram. | Resizable in both directions. |
A marker without a title and without tooltip text but with a link becomes a plain clickable area — useful for turning a diagram into a set of links.
7. Map settings
Settings apply to the whole map and are saved with it.
| Setting | Options | Default |
|---|---|---|
| Open on | Click · Hover | Click |
| Theme | Dark · Light | Dark |
| Pulse pins | On · Off | On |
8. Displaying a map
Shortcode
[image_hotspot id="12"]
The exact shortcode for each map is shown in the How to display this map box on the map’s edit screen, and in the Shortcode column of the map list.
Attributes
| Attribute | Required | Description |
|---|---|---|
id | Yes | ID of the map to render. |
max_width | No | Limits the display width, e.g. max_width="800" (pixels) or max_width="80%". |
[image_hotspot id="12" max_width="800"]
In a template file
<?php echo do_shortcode( '[image_hotspot id="12"]' ); ?>
<?php // or call the renderer directly:
echo IHS_Render::render( 12, array( 'max_width' => '800' ) ); ?>
Page builders
Any builder that supports shortcodes can display a map: use the block editor’s Shortcode block, Elementor’s Shortcode widget, WPBakery’s Text Block, or a shortcode-enabled widget.
9. Styling & CSS
All output is plain HTML with predictable class names, so it can be restyled from your theme or from Appearance → Customise → Additional CSS.
CSS custom properties
| Property | Set on | Meaning |
|---|---|---|
--ihs-color | Each hotspot | The marker colour chosen in the editor. |
--ihs-pin-size | .ihs-map | Pin diameter — 26px on desktop, 30px under 600px wide. |
/* Bigger pins everywhere */
.ihs-map { --ihs-pin-size: 34px; }
/* Wider tooltips */
.ihs-tip { max-width: 340px; }
/* Square shapes instead of rounded ones */
.ihs-hs--rect .ihs-hs__target { border-radius: 0; }
Class reference
| Class | Element |
|---|---|
.ihs-map | Outer wrapper. Also carries .ihs-map--dark or .ihs-map--light, plus .is-pulsing when the pulse is on. |
.ihs-map__frame | Positioning context around the image. |
.ihs-map__image | The image itself. |
.ihs-map__layer | Overlay that holds every marker. |
.ihs-hs | One marker, with .ihs-hs--pin, .ihs-hs--circle or .ihs-hs--rect; gains .is-open while its tooltip is open. |
.ihs-hs__target | The clickable button (or link) inside a marker. |
.ihs-tip | The tooltip; gains .is-below when it flips under the marker. |
.ihs-tip__title, .ihs-tip__text, .ihs-tip__link, .ihs-tip__close | Tooltip parts. |
10. Developer reference
Data storage
| Key | Stored on | Format |
|---|---|---|
Post type ihs_map | — | One post per map; supports the title only. |
_ihs_image_id | Map post meta | Attachment ID (integer). |
_ihs_hotspots | Map post meta | JSON array of hotspots. |
_ihs_settings | Map post meta | JSON object: trigger, theme, pulse. |
A single hotspot looks like this. All coordinates are percentages of the image; for pins x/y is the centre, for shapes it is the top-left corner.
{
"shape": "pin", // pin | circle | rect
"x": 35, // 0-100
"y": 40, // 0-100
"w": 20, // shapes only, 0-100
"h": 20, // shapes only, 0-100
"color": "#2563eb",
"title": "Living room",
"content": "South-facing with oak flooring.",
"link": "https://example.com/gallery",
"new_tab": 0
}
PHP
// Render a map anywhere in a template.
echo IHS_Render::render( int $map_id, array $args = array() );
// $args: [ 'max_width' => '800' ]
// Read raw data.
IHS_Data::get_image_id( $map_id ); // int
IHS_Data::get_hotspots( $map_id ); // array
IHS_Data::get_settings( $map_id ); // array
JavaScript
Maps initialise themselves on page load. If you inject a map with AJAX, re-run the initialiser afterwards:
window.ImageHotspot.init();
Uninstalling
Deactivating the plugin changes nothing. Deleting it from the Plugins screen permanently removes every map and its data, so export or back up first if you might need them again.
11. FAQ & troubleshooting
The shortcode shows as plain text
The map ID is missing or the shortcode is inside a block that does not process shortcodes. Use a Shortcode block, and check the ID against the map list.
“This map has no image yet”
The map was published before an image was chosen, or the image was deleted from the media library. Open the map, click Select image and update.
Nothing renders at all
Maps must be published — a draft renders nothing for visitors. Notices about broken maps are only visible to logged-in editors, never to visitors.
Markers sit in the wrong place
This happens when the theme crops the image (for example with object-fit: cover on all images). Add .ihs-map__image { object-fit: fill; height: auto; } to your custom CSS.
Tooltips are cut off at the edge
They should not be — a tooltip flips below the marker and shifts sideways to stay inside the image. If a theme sets overflow: hidden on the container, add .ihs-map__frame { overflow: visible; }.
Can I use the same map twice on one page?
Yes. Repeat the shortcode; each instance works independently.
Does it work with caching plugins?
Yes. The output is static HTML, so it caches like any other content.
12. Changelog & support
1.0.0
- Initial release.
For support, contact the author through the marketplace item page. When reporting a problem, please include your WordPress version, PHP version, active theme and a link to the page showing the map.