A clickable map of the fifty states
Some sites are organised by US state before they are organised by anything else: a directory of contractors, a guide to state hunting seasons, a summary of each state’s rental law. Mapper gives a site like that its skeleton. Activate it and you have a State post type with one page per state and an archive at /states/. Put the map on your home page and every state on it links to its page.
The original went on this site in July 2013. The original code did not survive, so the 2.0.0 download here is a clean build to the same feature list, for WordPress 6.2 and newer.
The map is real SVG
Each state is an SVG <path> wrapped in an <a> to its page, drawn inline in the page. No image file, no external request, sharp at any width. Alaska and Hawaii sit inset at the bottom left. Because the links are ordinary anchors, search engines follow them, and the alphabetical list underneath the map means visitors with no pointer and crawlers with no patience reach every page too. The outline data comes from the Wikimedia Commons blank US map by Heitordp, released CC0, so there is no licence to worry about.
JavaScript is used for one thing, the hover tooltip. Links, colours and the hover highlight all work with it off, and each path carries an SVG <title> so browsers show a native tooltip anyway.
Placing it
- The Mapper block, with wide and full alignment
[mapper width="800" list="no" tooltip="yes"]anywhere a shortcode runs[mapper_list]for the alphabetical link list on its own
State, hover and border colours, maximum width, tooltips and the link list are all set under States, Settings, and they are written to the wrapper as CSS custom properties, so a theme can override them without touching the plugin.
The state pages
The 50 pages are created once on activation and never duplicated. District of Columbia is optional. The map finds each page by a _mapper_code meta holding the two-letter code, not by title, so you can rename “Texas” to “Texas Contractors” and the link holds. Any State page with its map area set in the sidebar box is linked, which means you can delete the generated pages and use your own. There are “Create missing state pages” and “Delete all state pages” buttons on the settings screen; delete sends pages to the Trash, it never hard-deletes.
Limits
It is a map of the United States and nothing else. There is no county level, no Canada, no world map, and we are not planning one. Settings are sanitised (hex colours, bounded width), the create and delete actions post through admin-post.php with nonces and need manage_options, and all output is escaped. Tested on WordPress 7.1 with PHP 7.4 and newer.






