Flexible Map
[resolved] Plugin is in the code but doesnt display anything (7 posts)

  1. maRGas.
    Posted 2 years ago #

    Hi all,
    I've inserted the sample code and even tried my own code to display the plugin but I'm not having any luck.

    When I right click the big white space it has inserted and inspect element I can see it has inserted some code but it doesn't appear to be complete.

    [ Moderator note: please wrap code in backticks or use the code button. ]

    <div id="flxmap-52358c6f33c7d" class="flxmap-container" data-flxmap="flxmap_52358c6f33c7d" style="width:100%;height:400px;"></div>
    <div id="flxmap-52358c6f33c7d-dir" class="container"></div>
    /* <![CDATA[ */
    (function(w, fn) {
     if (w.addEventListener) w.addEventListener("DOMContentLoaded", fn, false);
     else if (w.attachEvent) w.attachEvent("onload", fn);
    })(window, function() {
     var f = new FlexibleMap();
     f.markerDirections = true;
     f.markerDirectionsDiv = "flxmap-52358c6f33c7d-dir";
     f.markerTitle = "Adelaide Hills";
     f.showMarker("flxmap-52358c6f33c7d", [-34.916721,138.828878], [-34.916721,138.828878]);
     window.flxmap_52358c6f33c7d = f;
    /* ]]> */

    It's like it's missing all of the divs etc inside the main div. I am guessing I may be missing some essential javascript because I've had this working on another site.

    You can see the page here. Click on the Bell (Day at the stones)

    Many thanks.


  2. webaware
    Plugin Author

    Posted 2 years ago #


    Two things I can see:

    1. Looks like your theme is missing the get_footer() call, which is required so that the scripts are loaded for lots of different plugins

    2. There's a big chunk of PHP code pasted into the footer inside script tags, from this plugin's readme file. Not meant to be there, not like that, so delete it.


  3. maRGas.
    Posted 2 years ago #

    G'day Ross,
    Thanks for replying so quickly!

    My bad about the code in the footer. Was trying to get it working and accidentally left it there. I do have <?php get_footer(); ?> in my index.php however.

    Doesn't seem to have fixed it unfortunately. Am I completely over looking the obvious?

  4. webaware
    Plugin Author

    Posted 2 years ago #

    I'm in front of the idiot box so can't easily check, but it looks like maybe this page is loading via Ajax lazy loading. Try adding the following code to your index.php template:

    <?php flexmap_load_scripts(); ?>


  5. maRGas.
    Posted 2 years ago #

    Gday again Ross,
    I did what you recommended and pasted <?php flexmap_load_scripts(); ?> into index.php but to no avail. I also tried in header and footer just for good measure but still no luck.

    I did have an ajax plugin installed (but not activated) so I deleted that just to be sure it wasn't caused by that and still no luck :(


    Any suggestions?

  6. webaware
    Plugin Author

    Posted 2 years ago #

    Are you able to send me login details via my contact page? I can login and have a look, see if I can see what's going on.


  7. maRGas.
    Posted 2 years ago #


    In case anybody else comes up with a problem like this. Be sure you have <?php wp_head(); ?> included in your header.php.

    Many thanks to Ross who was extremely helpful and found the problem for me.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Flexible Map
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.