Title: [Plugin: UMapper] Script insert only on pages where Map is needed
Last modified: August 19, 2016

---

# [Plugin: UMapper] Script insert only on pages where Map is needed

 *  [c-bass](https://wordpress.org/support/users/c-bass/)
 * (@c-bass)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/)
 * Hey,
 * Umapper is nice, but needs a lot of javascript to be loaded. since i only use
   the maps on a contact page, i dont want umapper scripts to slow down my page.
 * how can i modify the plugin to only load the scripts when needed on spezific 
   pages? i know how to do it with conditional comments in the header template file,
   but i doubt they work from within the plugin.
 * thousand thanks in advance!

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

 *  [umapper](https://wordpress.org/support/users/umapper/)
 * (@umapper)
 * [17 years ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017798)
 * Well, afaik before plug-in shortcode is parsed header is already emitted. As 
   about conditional comments – could you elaborate on this? Maybe I am missing 
   something – if it’s doable, I’d do it from within plug-in.
 *  [Ovidiu](https://wordpress.org/support/users/ovidiu/)
 * (@ovidiu)
 * [17 years ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017801)
 * I ma no coder, but maybe I can help out a little:
 * there are a couple of plugins you could maybe have a look at as they are doing
   roughly the same or at least dealing with the same issues.
    one is the deko boko
   plugin, which gives users the option of loading its files only on the contact
   page as they are not needed anywhere else: [http://wordpress.org/extend/plugins/deko-boko-a-recaptcha-contact-form-plugin/](http://wordpress.org/extend/plugins/deko-boko-a-recaptcha-contact-form-plugin/)
 * the second one could also be helpful, its the plugin Javascript Logic by Justin
   Tadlock: [http://justintadlock.com/archives/2008/12/12/javascript-logic-wordpress-plugin](http://justintadlock.com/archives/2008/12/12/javascript-logic-wordpress-plugin)
   which can include specific javascript files only on target pages.
 * Please have a look, maybe it helps you fix/modify umapper too 🙂
 *  [umapper](https://wordpress.org/support/users/umapper/)
 * (@umapper)
 * [17 years ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017804)
 * Ovidiu,
    Thanks a lot! Examples you provided are real-time savers. Would review
   them in details, and incorporate similar behavior into UMapper plugin.
 *  [umapper](https://wordpress.org/support/users/umapper/)
 * (@umapper)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017806)
 * Now no umapper scripts persist on client side – only <object> code if map is 
   present, but even then, no js – I made sure that client side stays as light as
   it could be.
 *  [Ovidiu](https://wordpress.org/support/users/ovidiu/)
 * (@ovidiu)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017807)
 * seems good, BUT after upgrading I see a message about: Update UMapper. Please
   re-validate your API key.. if I click on the link, or go straight to the umapper
   options page, I get: You do not have sufficient permissions to access this page.
 * I have no idea what to do, I already checked file permissions, then I checked
   my user: I am admin, still can’t access the plugin options 🙁
 * HELP
 *  [umapper](https://wordpress.org/support/users/umapper/)
 * (@umapper)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017808)
 * That’s quite an awful issue, which makes it even worse – I cannot reproduce it
   on my WP installation. Can you please contact me via victor ~ at ~ afcomponents
   dot com, plus provide with details of your WP installation (what I might need
   is WP version, plugin version, OS, browser type and version). I would try to 
   resolve this issue as the first priority.
 * Thanks in advance!
 *  [Ovidiu](https://wordpress.org/support/users/ovidiu/)
 * (@ovidiu)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017809)
 * oh, issue went away with the latest Umapper upgrade from this morning 🙂 all 
   is fine now.
 *  [umapper](https://wordpress.org/support/users/umapper/)
 * (@umapper)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017810)
 * Good! I have upgraded the plugin with possible fix – and I am really happy that
   it did the trick! Let me know about any other issues, or possible improvements
   on how plugin functions.
 * Thanks!
 *  [Ovidiu](https://wordpress.org/support/users/ovidiu/)
 * (@ovidiu)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017811)
 * just one little thing: if I write a new post and click the umapper icon, it automatically
   starts creating a new map, wouldn’t it be nice to be asked: do you want to use
   an existing map or create a new one before that?
 * Otherwise a perfect plugin 🙂
 *  [Ovidiu](https://wordpress.org/support/users/ovidiu/)
 * (@ovidiu)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017812)
 * oh, btw. could you please post a changelog somewhere? I hate updateing and not
   knowing what the improvements are 🙁
 *  [umapper](https://wordpress.org/support/users/umapper/)
 * (@umapper)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017815)
 * Hi, about new map/editing – you are perfectly right – it’s already in my todo
   list, so that if you select map embed tag, then hit the U icon, selected map 
   should be loaded (as this is most probably what user would expect).
 * Regarding changelog – I would issue one on plugin’s page, but general rule of
   thumb is versioning: 3.0.1 – first number is a major, you should definitely update,
   second one – any major fix/feature, you should update if you had any problems
   with umapper, and the minor numbers are mainly for maintenance (when I recompile
   language files, fix some typing errors etc), so most probably you do not need
   that update (again, if everything works as you expect it).
 * Would try to wrap that add new / edit map feature till the end of this week. 
   Let me know any other findings!
 * Thanks for you help!

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

The topic ‘[Plugin: UMapper] Script insert only on pages where Map is needed’ is
closed to new replies.

 * 11 replies
 * 3 participants
 * Last reply from: [umapper](https://wordpress.org/support/users/umapper/)
 * Last activity: [16 years, 11 months ago](https://wordpress.org/support/topic/plugin-umapper-script-insert-only-on-pages-where-map-is-needed/#post-1017815)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
