Support » Plugin: Google Maps Embed » [Plugin: Google Maps Embed] Map not showing in post with PHP

  • L.S.,

    I love the look and feel of your plugin, but for some reason it wasn’t working for me. I’m using v1.5 with WP 3.0.1.

    I used the HTML editor to add the map code and the code looks like:
    [cetsEmbedGmap src=,-95.677068&sspn=69.187191,56.513672&ie=UTF8&hq=ritmeester+bv&hnear=Nieuwegein,+Utrecht,+Nederland&z=13&iwloc=A width=350 height=425 marginwidth=0 marginheight=0 frameborder=0 scrolling=no]

    When I set debug to true, I saw the following error message:
    Warning: Wrong parameter count for substr_count() in /mywordpressinstall/wp-content/plugins/google-maps-embed/lib/shortcodes.php on line 42

    Original line 42 in shortcodes.php:
    if (substr_count($src, '', 0) == 0) return;

    substr_count() can only take the third parameter (offset) starting from PHP 5.1 and as it’s 0 anyway, it’s not really needed. To fix the plugin, just replace that line with:
    if (substr_count($src, '') == 0) return;


  • The topic ‘[Plugin: Google Maps Embed] Map not showing in post with PHP’ is closed to new replies.