• Hi.

    Great plugin has made developing complex store listings easy.

    Only problem I’m having is when using wpsl or wpsl_map nested in a tab or toggle shortcode the map only displays as a gray box if it is in the second or third tab or toggle. (The markers display and store details display)

    If it is in first tab or toggle map displays correctly.

    I am assuming this is to do with the way the map loads. Any work around for this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Google Maps in a tab is indeed a problem.

    The store locator code includes a fix, but this only runs when the tab anchor itself is set to ‘wpsl-map-tab’.

    If you want to change this, then you can use the ‘wpsl_map_tab_anchor’ filter to set it a custom value.

    Thread Starter toca711

    (@toca711)

    Sorry for my ignorance. How do I find the anchor in inspector?

    This is some of the html (with heaps cut out) for the tabs

    <div id="pl-tabs-0" class="pl-tabs pl-tabs-vertical-no">
    <ul class="pl-tabs-nav fix">
    <li class="pl-status-active">
    <a href="!#" data-count="0" data-id="#pl-tab-tab-one">Tab One</a>
    </li>
    <li>
    <a href="!#" data-count="1" data-id="#pl-tab-wpsl-map-tab">wpsl-map-tab</a>
    </li>
    </ul>
    <div id="pl-tab-tab-one" class="pl-tab-content" style="display: block;">
    <div id="pl-tab-wpsl-map-tab" class="pl-tab-content">
    
    Plugin Author Tijmen Smit

    (@tijmensmit)

    In the HTML you pasted the anchor is this !# which isn’t valid. Is it generated? What’s the URL?

    Thread Starter toca711

    (@toca711)

    Ok I thought that might be the case.
    This is just the way the theme I use generates tabs. (it uses bootstrap tabs) from what I can tell I may need to make a JS fix.

    I have tried a couple of others but they do similar things or don’t have the href at all.

    I will try find a plugin where I can set the anchor.

    Thanks

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Well, you don’t necessarily need one where you can set the anchor, it just needs to have a valid and fixed one.

    Once you have that, then you can change the used anchor value in the plugin by using the ‘wpsl_map_tab_anchor’ filter.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Map just gray box when nested in shortcode’ is closed to new replies.