DEV Community

hub
hub

Posted on

how to remove all things Google-Maps from Wordpress - to meet the GDPR-Compliance - a HowTo

Hello dear

running 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!!

now - we can come up with one - which is not verified yet:

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:

'php
Copy code
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

Just use it - just test it - let us know your experience

Top comments (0)