Support

Account

Home Forums General Issues Conditionally load Google Maps script if the map field is present on any page Reply To: Conditionally load Google Maps script if the map field is present on any page

  • @exove you could put this in your header:

    
    if (get_field('location')) :
      wp_enqueue_script('...');
    endif;
    

    …where location is the name of your field