1. Description
  2. Usage
  3. Changelog
  4. Source File


When Google Maps is loaded inside a tab it will often show up grey. To fix this the plugin includes code that makes it behave as expected, but for the code fix to run it also expects the href of the tab link to be set to “wpsl-map-tab”.

This filter makes it possible to use custom href values in case the tabs are generated, or you can’t easily use another href value.


The first example shows you how to change the targeted href value to “custom-map-tab”.

Replace “custom-map-tab” with the href value used on your own site, and the map should show up as expected.

If you like to show the store locator in multiple tabs ( this is only possible with the wpsl_map shortcode and version 2.2.10+ ), then you have to use the example below.

Replace the “custom-map-tab”, “custom-second-map-tab”, “custom-third-map-tab” with a list of href values used in your own tab list.

You can find the used href value in the tab(s) on your site by using the web developer tools in your favorite browser. You can open them by pressing ctrlshifti, then select the tab you like the show the map in and look for the value between href=””. This is the value you need to use in the filter code.


Since 2.0.2

Source File

This filter is located in /frontend/class-frontend.php.


The code needs to be placed in the functions.php file inside your active theme folder.