Add Google Maps API snippet in Dashboard admin backend
-
Hello, i have a plugin that adds a google maps view directly when adding a new post.
It works on frontend but in backend i can’t add the google maps API to make it work.Following the javascript example, I added this snippet:
add_action( 'wp_head', function () { ?> <script src="https://maps.googleapis.com/maps/api/js?key=[MY_API_KEY]&callback=initMap" type="text/javascript"></script> <?php } );
I’ve activated this snippet for the admin-side only, but it doens’t have much effect.
I think I’m missing something obvious (maybe wp_head is wrong?) ,but unfortunately I’m a noob in this.Could you help me with this?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Add Google Maps API snippet in Dashboard admin backend’ is closed to new replies.