Title: Template shortcode not workink &#8230; map code is empty
Last modified: August 21, 2016

---

# Template shortcode not workink … map code is empty

 *  Resolved [masterbip](https://wordpress.org/support/users/masterbip/)
 * (@masterbip)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/template-shortcode-not-workink-map-code-is-empty/)
 * 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; </script> —————— But there is no map!!!
 * What I’m doing wrong?
    Thanks, sorry to bother you, but this is kind of urgent….
 * [http://wordpress.org/plugins/codepeople-post-map/](http://wordpress.org/plugins/codepeople-post-map/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/template-shortcode-not-workink-map-code-is-empty/#post-4058165)
 * Hi,
 * Please, be sure you have defined at least a point in the page or post.
 *  [webmystery](https://wordpress.org/support/users/webmystery/)
 * (@webmystery)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/template-shortcode-not-workink-map-code-is-empty/#post-4058365)
 * 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: [http://vallejoopenstudios.com/category/artists/2013/](http://vallejoopenstudios.com/category/artists/2013/)
 * 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](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/template-shortcode-not-workink-map-code-is-empty/#post-4058366)
 * Hi,
 * 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]’); ?>
 *  [sebasll](https://wordpress.org/support/users/sebasll/)
 * (@sebasll)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/template-shortcode-not-workink-map-code-is-empty/#post-4058490)
 * 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?
 * Thanks!!
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/template-shortcode-not-workink-map-code-is-empty/#post-4058491)
 * Hi,
 * 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, [http://wordpress.dwbooster.com/support](http://wordpress.dwbooster.com/support)),
   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.

 * ![](https://ps.w.org/codepeople-post-map/assets/icon-256x256.jpg?rev=980165)
 * [CodePeople Post Map for Google Maps](https://wordpress.org/plugins/codepeople-post-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/codepeople-post-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/codepeople-post-map/)
 * [Active Topics](https://wordpress.org/support/plugin/codepeople-post-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/codepeople-post-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/codepeople-post-map/reviews/)

 * 5 replies
 * 4 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/template-shortcode-not-workink-map-code-is-empty/#post-4058491)
 * Status: resolved