Since WP Store Locator 3.0 you can set a marker for each category on the category screen, without any code or extra plugin.
Set the Category Marker
- Go to Store Locator > Store Categories, and add a new category or click the one you want to edit.
- Check Enable category markers.
- Choose the Category Marker, the marker shown on the map, and the Active Category Marker, the marker shown when a location is selected. To design your own marker, use the Create Custom Marker link next to the dropdowns. It takes you to the Marker Studio.
- Save the category.
Saving the category clears the store locator cache for you, so the new markers show up straight away.
Which Marker Is Used
- A store in one category gets the marker of that category.
- A store in more than one category gets the marker of its first category. When a visitor filters the search results by category, the store gets the marker of the selected category instead.
- A marker you pick in the Marker box on the store edit screen takes priority over the category marker. See Use a Different Marker for Each Location.
- Stores without a category marker use the marker from the settings page.
Store Pages and the wpsl_map Shortcode
The category markers are also used on the store pages, and on maps made with the wpsl_map shortcode, including when you use its category attribute. No extra code is needed.
Did you use the Categories Images plugin with the code from an earlier version of this page? The markers you set with that plugin aren’t imported. Set them again on the category screen, then remove the old code from your functions.php. Until you do, the old code overrides the category markers in the search results.
Markers not showing up? Clear the Autoload cache under Store Locator > Settings > Tools.