Home Forums Front-end Issues Display Map in Topic Post Reply To: Display Map in Topic Post

  • This worked for me:

    Note: this code crashed my site

    function my_acf_google_map_api( $api ){
        $api['key'] = 'xxx';
        return $api;
    add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');

    This code did work:
    function my_acf_init() {
    acf_update_setting(‘google_api_key’, ‘xxx’);
    add_action(‘acf/init’, ‘my_acf_init’);

    NOTE: When I went to edit the topic that was working all of my custom fields were missing.
    They were also gone in the ACF plugin module. (This happened to me before.)

    So I created new custom fields and everything seems to be working fine. All I can think is the function code that crashed corrupted the ACF.