This guide covers common issues with CP Locations and their solutions.
Map Not Displaying
Blank or Missing Map
- Check MapBox API Key — Navigate to Locations → Settings → Main and verify your MapBox API key is entered correctly
- Test the key — Log in to account.mapbox.com and confirm your token is active and has the correct scopes
- Check for JavaScript errors — Open your browser’s developer console (F12) and look for errors related to MapBox or Leaflet
- Caching conflicts — Clear your site cache and any CDN cache. Ensure REST API endpoints (
/wp-json/cp-locations/v1/) are excluded from caching
Map Loads but No Markers
- Verify locations exist — Check that you have published locations in Locations
- Check addresses — Ensure each location has an address entered. Locations without geocoded coordinates will not appear on the map.
- Inspect API response — Visit
https://yoursite.com/wp-json/cp-locations/v1/locationsin your browser. Each location should have ageodataobject withcentercoordinates.
Geocoding Issues
Address Not Converting to Coordinates
- Verify MapBox API key — The key is required for geocoding
- Check address format — Use a standard, complete address (street, city, state, zip)
- Manual override — Enter coordinates manually in the Geolocation field (format:
lat, lng, e.g.,40.7128, -74.0060) - Re-save the location — Geocoding runs on save only when no coordinates are stored. Clear the Geolocation field, then click Update to trigger a new geocoding request.
Marker in Wrong Position
- Check the address — Verify the address is correct and specific enough for accurate geocoding
- Use manual coordinates — Enter the exact latitude and longitude in the Geolocation field to override the auto-geocoded position
- Find coordinates — Use Google Maps to find the correct coordinates: right-click the location on the map and copy the lat/lng values
Zip Code Search Not Working
- Verify MapBox API key — Zip code lookup requires a valid MapBox key
- US zip codes only — The search field accepts 5-digit US zip codes. It triggers automatically when exactly 5 digits are entered.
- Check REST API — Test the endpoint directly:
https://yoursite.com/wp-json/cp-locations/v1/locations/postcode/90210 - 100-mile radius — Only locations within 100 miles of the searched zip code are shown. If all locations are farther, a “No results found” message appears.
Display Issues
Wrong Location Order
Locations display in menu order. Edit each location and set the Order value in the Page Attributes panel. Lower numbers appear first.
Missing Thumbnails
Set a Featured Image for each location. The thumbnail appears in the finder list, map popups, and card views.
Mobile Display Problems
- Responsive breakpoint — The mobile view activates below 1025px. Test at various screen sizes.
- iOS Safari — The plugin includes iOS Safari-specific adjustments. If the layout appears broken, clear the Safari cache.
- Touch scrolling — The mobile view includes gesture handling to prevent conflicts between the map and the sliding panel.
REST API Issues
If the location finder shows errors:
- Check REST API access — Visit
https://yoursite.com/wp-json/cp-locations/v1/locationsin your browser - Security plugins — Some security plugins block REST API access. Whitelist the
cp-locations/v1namespace. - Caching — Exclude
/wp-json/from your caching plugin’s cached URLs
For additional help, see the Getting Help guide.
