Hello dear
running the wp-jobmanager and the theme Jobify: [https://astoundify.com/products/jobify/])
this includes some google-maps that means it fetches the maps from google-Api. This may cause some GDPR issues for lots of user in the world,
**solution:** we tried to find a solution that takes away the google-assets from the page – completly!!
**note:** this guy also wanted to do this: [https://wordpress.org/support/topic/disable-google-maps-scripts/])
now – we can come up with one – which is not verified yet: so this posting is regarded as **proof of concept:**
Just in case anybody is interested in an answer i guess that we can do this like so: To remove Google Maps from the Jobify theme completely, we can try **this steps** and follow these ones:
Go to the WordPress dashboard and navigate to the “Appearance” section. Click on “Editor” to access the theme files.
Open the “functions.php” file. Locate the code that initializes the Google Maps API. It should look something like this:
function jobify_google_maps_api() { wp_register_script( ‘google-maps’, ‘//maps.googleapis.com/maps/api/js?key=YOUR_API_KEY’, array(), null, false ); wp_enqueue_script( ‘google-maps’ ); } add_action( ‘wp_enqueue_scripts’, ‘jobify_google_maps_api’ );
Comment out or delete this code to disable the Google Maps API. Save the changes to the file.
This should remove Google Maps from the Jobify theme completely. However, keep in mind that removing this functionality may affect other parts of the theme,so we may need to make additional changes or modifications to ensure the theme still works as intended.
Well i want to share this just in case anybody is interested in an answer i guess that we can do this like so:
see also: [https://wordpress.stackexchange.com/questions/219049/remove-extra-google-maps-script])
Hope that helps others too
**note**: This change will be undone when the theme updates To make this happen in a way that will not go away on update you can create a child theme or a custom plugin and use
remove_action(‘wp_enqueue_scripts’, ‘jobify_google_maps_api’ );
,,,,,to prevent the map from loading
see also: [https://wordpress.stackexchange.com/questions/219049/remove-extra-google-maps-script])
Just to add on to your explanation, you can use a plugin such as Code Snippets to add that remove action, this way it will remain after the theme updates and you don’t have to manually create a child theme or custom plugin.
see the plugin code-snippet: [https://wordpress.org/plugins/code-snippets/])
​
we look forward to hear from you
[ad_2]