0

I want to insert a Google Map into Wordpress without paying for a plugin. I just want to adjust the style, add a few markers and add a description to the makers. Therefore I simple used the example code from Google Maps and adjusted the style. So far so good.

The question is now, how can I insert my code? It is more or less like this: https://developers.google.com/maps/documentation/javascript/examples/map-simple

If I can't add the code directly do you know any free plugin which would allow me to achieve my mentioned points (custom style, multiple markers, markers description)?

Regards,

x0100

edit: I found a plugin which allowed me to to it for free "Google Maps Easy" (https://wordpress.org/plugins/google-maps-easy/).

1 Answer 1

0

I'm not sure, which wordpress version you are using but all wordpress versions supports custom html embedding on page.

Here's how you can do: (WordPress 5.1.1)

  1. Go to Pages
  2. Add/Edit Page
  3. Click on Plus Icon (step 1 in below screenshot)
  4. Search for Custom HTML (step 2 in below screenshot)

enter image description here 5. Paste map html in page (sample available below)

enter image description here

Keep in mind, adding custom css and javascript; directly in page is not recommended!

Hope it helps! :)

2
  • Thanks for getting back to me. This is exactly what I tried. When I afterwards load my WordPress page it shows no map and no error. Is it working for you? I use WordPress 5.2.1. When you say it is not recommended, which other option do I have?
    – x0100
    May 28, 2019 at 10:26
  • Did you replace YOUR_API_KEY with actual API keys? Embedding javascript in page is not recommended, it should be enqueued in functions.php file; but that's complex for non-tech guys! May 28, 2019 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.