Title: [Plugin: Google Maps v3 Shortcode] Deregister plugin
Last modified: August 20, 2016

---

# [Plugin: Google Maps v3 Shortcode] Deregister plugin

 *  [polyfade](https://wordpress.org/support/users/polyfade/)
 * (@polyfade)
 * [14 years ago](https://wordpress.org/support/topic/plugin-google-maps-v3-shortcode-deregister-plugin/)
 * I only use this plugin (shortcode) on one page. Therefore, I do not need the 
   calls to google’s javascript api and related css called on every page. Is there
   a way to conditionally call the plugin without touching the plugin itself? Perhaps
   in the functions.php file? PHP is not my first language, so how would this literally
   be accomplished?
 * Thanks in advance!
 * [http://wordpress.org/extend/plugins/google-maps-v3-shortcode/](http://wordpress.org/extend/plugins/google-maps-v3-shortcode/)

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

 *  [Bill Addison](https://wordpress.org/support/users/billaddison/)
 * (@billaddison)
 * [14 years ago](https://wordpress.org/support/topic/plugin-google-maps-v3-shortcode-deregister-plugin/#post-2734148)
 * I have the exact same issue with this plugin. The plugin’s code is being injected
   into the header of every page, but I’m using the shortcode on one page only.
 *  Thread Starter [polyfade](https://wordpress.org/support/users/polyfade/)
 * (@polyfade)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-google-maps-v3-shortcode-deregister-plugin/#post-2734149)
 * Bill,
    If this annoys you as much as it did me, I did the one thing you probably
   shouldn’t do (especially if there’s an update). I modified the plugin itself.
 * In _Google-Maps-v3-Shortcode.php_, I removed the call to Google Maps API. I believe
   starting with line 13 – 23
 *     ```
       // Add the google maps api to header
       add_action('wp_head', 'gmaps_header');
   
       function gmaps_header() {
       	?>
       	<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
       	<style type="text/css">
               .entry-content img {max-width: 100000%; /* override */}
           </style>
       	<?php
       }
       ```
   
 * In you functions.php page add the following:
 *     ```
       function gmap() {
       if ( is_page( 'contact-us') ) {
       wp_register_script('googleMap', ('http://maps.google.com/maps/api/js?sensor=false'));
       wp_enqueue_script('googleMap'); }
       }
       add_action( 'wp_print_scripts', 'gmap');
       ```
   
 * Replace ‘contact-us’ to whatever your page slug is called.
 * Basically this adds the Google Maps API back in to only the page you have the
   map appear on.
 *  [Bill Addison](https://wordpress.org/support/users/billaddison/)
 * (@billaddison)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-google-maps-v3-shortcode-deregister-plugin/#post-2734150)
 * thanks man
 *  [DaisyDesign](https://wordpress.org/support/users/daisydesign/)
 * (@daisydesign)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-google-maps-v3-shortcode-deregister-plugin/#post-2734182)
 * It doesn’t work for me! 🙁
    I have some problems with the rule: `.entry-content
   img {max-width: 100000%; /* override */}` It override my css file and affect 
   every img on my site.
 * How can I fix it?
    Thanks!

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

The topic ‘[Plugin: Google Maps v3 Shortcode] Deregister plugin’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/google-maps-v3-shortcode.svg)
 * [Google Maps v3 Shortcode](https://wordpress.org/plugins/google-maps-v3-shortcode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-maps-v3-shortcode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-maps-v3-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/google-maps-v3-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-maps-v3-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-maps-v3-shortcode/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [DaisyDesign](https://wordpress.org/support/users/daisydesign/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-google-maps-v3-shortcode-deregister-plugin/#post-2734182)
 * Status: not resolved