Support

Account

Forum Replies Created

  • As I’m only using the Pro version, I can’t help you out on this one.

    PS: if you like using ACF for your projects, consider buying the Pro version

  • @heidijoe quoting the WP Codex “wp_enqueue_scripts is the proper hook to use when enqueuing items that are meant to appear on the front end.”
    If you’re using the ACF Google Maps field and want a temporary solution for the API key problem while we wait for a proper ACF update, follow the steps I mentioned in my first post on the previous page.

  • @jakelevell I’m still using the temporary fix till the new ACF version is out of beta and the addition of the API key is documented.

  • @7am As of June 22, 2016 Google Maps V3 no longer supports keyless access from domains which has never had a Google Map on it before. So some of the students will be using domains that are already known by Google before the 22nd and some are using new domains I suppose.

  • @constantine_ua are you sure you added al the different Google Maps API’s?
    The one used to load the map is another one than the one to look up the address.
    I switched them all on:
    Google Maps Directions API
    Google Maps Distance Matrix API
    Google Maps Elevation API
    Google Maps Geocoding API
    Google Maps JavaScript API
    Google Places API Web Service
    Google Static Maps API

    If you check your browser-console, I believe Google will give you an error stating which one is missing.

  • @gab1982 the temporary fix is only intended for the WordPress backend because I suppose everyone has his own way of implementing the Google Map in the frontend.

    If you used the embed code mentioned on the official ACF Google Maps page (https://www.advancedcustomfields.com/resources/google-map/), you just have to change the script-tag:

    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>

    becomes

    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=XXX"></script>

    XXX being your own Google API key

    A better option to include the JS-file in your frontend is by registering & enqueueing the script, you can do this by placing the following code inside your functions.php file, or have a look at a specific tutorial like https://premium.wpmudev.org/blog/adding-scripts-and-styles-wordpress-enqueueing/ (just the first that came up in Google search, I have nothing to do with wpmudev)

    /**
     * enqueue scripts and styles 
     *
     */
    
    function nr_load_scripts() {
    		
    	wp_register_script('googlemaps', 'https://maps.googleapis.com/maps/api/js?key=XXX',null,null,true);  
    	wp_enqueue_script('googlemaps');
    		
    }
    add_action( 'wp_enqueue_scripts', 'nr_load_scripts' );

    – again, replace XXX with your own Google API key
    – change the true to false if you want to load the script in de header of the page instead of at the bottom.

  • As a temporary fix, you can follow these steps:

    – get a Google API Key

    – make sure the Google Maps Api’s are enabled:

      Google Maps Directions API
      Google Maps Distance Matrix API
      Google Maps Elevation API
      Google Maps Geocoding API
      Google Maps JavaScript API
      Google Places API Web Service
      Google Static Maps API

    – copy the generated API key

    – open the acf-input.min.js file located in the plugins folder of your WordPress-install (full path: /wp-content/plugins/advanced-custom-fields-pro/assets/js/acf-input.min.js)

    – find sensor=false&libraries=places and replace both instances with key=XXX&libraries=places (replace XXX with your own API key)

    – enjoy!

    IMPORTANT REMARK: as soon as you update the ACF plugin, the file will be overwritten and the key will be lost, hopefully there will be a proper solution in the next release of ACF

  • Hi Elliot

    I’ve downloaded the new ACF Pro package from my account and installed it on the site I previously had problems with.

    It’s working fine now. Only tested with the taxonomy field, field type “radio buttons”

  • Same issue here, although I only got the problem when using the taxonomy-field.
    The WYSIWIG, checkboxes, radiobuttons,.. al worked as expected.
    The JS problem was located in the input.js file.

Viewing 9 posts - 1 through 9 (of 9 total)