Support » Plugin: Google Maps CP » Template shortcode not workink … map code is empty

  • Resolved masterbip


    Hi there. I think this google map plugin really rocks. But I got an issue. I’m using this in my custom index
    <?php echo do_shortcode(‘[codepeople-post-map]’); ?>

    When browsing got this html code as part of shortcode
    <div id=”cpm_Qjf9Qv” class=”cpm-map” style=”display:none; width:100%px; height:360px; clear:both; overflow:hidden; margin:10px auto;”></div>
    <script type=”text/javascript”>
    var cpm_language = {“lng”:”es”};var cpm_global = cpm_global || {};
    cpm_global[‘cpm_Qjf9Qv’] = {};
    cpm_global[‘cpm_Qjf9Qv’][‘zoom’] = 10;
    cpm_global[‘cpm_Qjf9Qv’][‘dynamic_zoom’] = false;
    cpm_global[‘cpm_Qjf9Qv’][‘markers’] = new Array();
    cpm_global[‘cpm_Qjf9Qv’][‘display’] = ‘map’;
    cpm_global[‘cpm_Qjf9Qv’][‘highlight_class’] = ‘cpm_highlight’;
    cpm_global[‘cpm_Qjf9Qv’][‘highlight’] = true;
    cpm_global[‘cpm_Qjf9Qv’][‘type’] = ‘ROADMAP’;
    cpm_global[‘cpm_Qjf9Qv’][‘show_window’] = true;
    cpm_global[‘cpm_Qjf9Qv’][‘show_default’] = true;
    cpm_global[‘cpm_Qjf9Qv’][‘mousewheel’] = true;
    cpm_global[‘cpm_Qjf9Qv’][‘zoompancontrol’] = true;
    cpm_global[‘cpm_Qjf9Qv’][‘typecontrol’] = true;
    But there is no map!!!

    What I’m doing wrong?
    Thanks, sorry to bother you, but this is kind of urgent….

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



    Please, be sure you have defined at least a point in the page or post.

    So it looks like I can’t put his in a template file like archive.php, and that it has to be in a page or a post (in which case the regular shortcode is all you need).

    I tried putting the map in an individual post to show on the archive page, but then it ignores the individual post map settings and reverts to the default size. I need it 200px here:

    I only want one map here – not one for every post. Thanks!

    (what I really want is a percentage width, but that appears to break it – I’ll write that up as a separate issue)

    Update – now it is displaying a map with no background for the most recent post I added a map to, so I set .archive .cpm-map to display:none

    Plugin Author codepeople



    You may insert the shortcode of map directly in the archive template, but the points must be associated to the posts to be loaded in the archive. If the posts displayed in the archive page have not points associated the map is not displayed.

    The shortcode to insert in templates is:

    <?php echo do_shortcode(‘[codepeople-post-map]’); ?>

    Hi any change you could help me out,

    I’m trying to use the plugin but cannot get it to work whatsoever.

    I’ve tried putting <?php echo do_shortcode(‘[codepeople-post-map]’); ?> in my template however I get an empty div:

    <div id=”cpm_JLDt5X” class=”cpm-map” style=”display:none; width:450px; height:500px; clear:both; overflow:hidden; margin:10px auto;”></div>

    I’ve also tried “Insert Map Tag” after verifying the address, but this yields nothing. Not even an empty div. So something is definitely not loading or working properly.

    Actually, I tried loading jQuery in the header as it was loading at the bottom…and that seems to have fixed it. However, we would prefer to keep jQuery at the bottom.

    Any chance of getting this to work with jQuery at the bottom of the page?


    Plugin Author codepeople



    If you insert the shortcode directly on template file, the map will be displayed if any of posts loaded on page includes a point.

    If the issue persist, I will need the WordPress access to check the issue in detail (uses our support page,, and please, indicate the template file where the shortcode was inserted.

    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Template shortcode not workink … map code is empty’ is closed to new replies.