From personal blog, travel blog to company web page, we need to embed Google Map to show proper location. There are few WordPress plugins available to serve the same feature. But I always intend to not using WordPress plugins if it can be served by writing code.
We can create a simple WordPress shortcode to enable Google Map embed feature inside post or page.
How to create Google Map embed shortcode?
1.Open functions.php file in your theme folder.
2.Put the following code and save the file.
Thank you very much. It worked like a charm.
Google search console was saying that my page wasn’t mobile-friendly. It took me hours to figure out that it was because the embedded map.
You saved my day. 🙂