Title: Google maps function without a plugin
Last modified: August 21, 2016

---

# Google maps function without a plugin

 *  [Dvd709](https://wordpress.org/support/users/dvd709/)
 * (@dvd709)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/google-maps-function-without-a-plugin/)
 * Hi guys,
 * I need to implement Google maps into this website without using a plugin, though
   I have a custom written jscript function in my scripts.js.
 * Now i’m left puzzled on how to make this visual on wordpress. What I tried so
   far is this, and i’m not sure how to otherwise.
 *     ```
       //Google Maps
       function gmaps_header(){
       ?>
       	<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
       <?php
       }
       add_action('wp_head','gmaps_header');
   
       function gmap() {
       if ( is_page('contact') ) {
       	    wp_register_script('initialize', ("". get_template_directory_uri() ."/scripts/script.js"));
       	wp_enqueue_script('initialize'); }
       }
       add_action( 'wp_print_scripts', 'gmap');
       ```
   

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/google-maps-function-without-a-plugin/?output_format=md)
[1](https://wordpress.org/support/topic/google-maps-function-without-a-plugin/?output_format=md)
2

 *  [parcodeisuoni](https://wordpress.org/support/users/parcodeisuoni/)
 * (@parcodeisuoni)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/google-maps-function-without-a-plugin/page/2/#post-4501322)
 * [@dvd709](https://wordpress.org/support/users/dvd709/): what do you mean exactly
   with
 * > All I have to do now is combine it with my JS code because it’s not allocated
   > to me but just somewhere random, any idea how I can do this?

Viewing 16 replies (of 16 total)

[←](https://wordpress.org/support/topic/google-maps-function-without-a-plugin/?output_format=md)
[1](https://wordpress.org/support/topic/google-maps-function-without-a-plugin/?output_format=md)
2

The topic ‘Google maps function without a plugin’ is closed to new replies.

## Tags

 * [custom function](https://wordpress.org/support/topic-tag/custom-function/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [function.php](https://wordpress.org/support/topic-tag/function-php/)
 * [show on page](https://wordpress.org/support/topic-tag/show-on-page/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 16 replies
 * 3 participants
 * Last reply from: [parcodeisuoni](https://wordpress.org/support/users/parcodeisuoni/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/google-maps-function-without-a-plugin/page/2/#post-4501322)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
