WordPress.org

Support

Support » How-To and Troubleshooting » Error embedding google maps

Error embedding google maps

Viewing 6 replies - 1 through 6 (of 6 total)
  • Those instructions are for WordPress.com. Are you using a WordPress.com blog or have your own install of wordpress?
    Wordpress.com forum http://en.forums.wordpress.com/

    I embed google maps into custom fields so the editor doesn’t mess with it. And create custom page template to pull the custom field.

    I found this code from a plugin (waste of plugin in my opinion for such little code).

    I haven’t tried it but you could put this in your functions.php (or install the plugin)

    function customfields_shortcode($atts, $text) {
    	global $post;
    	return get_post_meta($post->ID, $text, true);
    }
    
    @add_shortcode('cf','customfields_shortcode');

    Then make a custom field called ‘googlemap’ to paste the code. Then use [cf]googlemap[/cf] in the post.

    Hi,
    Cheers for that. I ended up adding it as a plugin as when I added it to functions.php, it “broke” the site. I am not sure why.
    It works like a dream. I am still finding my feet with wordpress, using it a cms system for clients.

    Stuart.

    Hi,
    I am not sure if this is related to the custom field, but when you click on a link to a post containing the embedded map, it links to the embedded map at the bottom of the page, once the map loads rather than the usual top of page. If you visit, http://www.osbornhomes.co.uk/wordpress/ and click the link to East Grinstead on th right hand menu, you will see it initially goes to the top of the page, but moves down to the bottom, once the page loads.
    Any ideas?

    Stuart.

    Hi,
    I found a similar post reprting the same issue, but it didn’t continue.
    http://wordpress.org/support/topic/page-opens-but-jumps-down-to-the-bottom-right-away?replies=2

    Stuart.

    edit: let me check this out again. i finally able to reproduce the issue.

    It definitely has to be fault of google maps as I created a long page with nothing but the google map embed and it jumped on me in IE8.

    Hi,
    Yes it appears to be only a problem with embedded street view maps in IE. The normal embedded google maps are fine.

    http://www.google.com/support/forum/p/maps/thread?tid=2de33de5d4fd3205&hl=en

    Thanks again for your help.

    Stuart.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error embedding google maps’ is closed to new replies.
Skip to toolbar