Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1321542
    thewellreadmom
    Participant

    I have pasted Google maps Geolocation javascript(found here: https://developers.google.com/maps/documentation/javascript/geolocation) to the Setting>Custom js in Cornerstone.

    It does not seem to be working at all. Do I need to add a function to the childtheme? If so, then what can actually be added to the Custom js?

    Thank you!

    #1321817
    Rupok
    Member

    Hi there,

    You will need to load the external script as well. You could add the code to your Child Themeā€˜s functions.php :

    function custom_google_map() { ?>
      echo '<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">';
    <?php }
    
    add_action( 'wp_footer', 'custom_google_map' );

    Now add the plain JavaScript within Custom JS and add the necessary HTML with proper ID as described there.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1321542 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>