WordPress.org

Ready to get started?Download WordPress

Forums

Stupid Simple Google Maps
I get 2 empty blue boxes instead of the Goggle Map (5 posts)

  1. w1cky
    Member
    Posted 2 years ago #

    This sounds like a good, simple plugin. But it doesn't seem to work.

    http://wordpress.org/extend/plugins/stupid-simple-google-maps/

  2. erik.wiffin
    Member
    Plugin Author

    Posted 2 years ago #

    That's a stange issue, I haven't seen that before. Could you send me a link to where I can see this behaviour in action?

    Also, could you double-check that you're using the plugin correctly? I've got a page of samples in case that might help: http://simple-maps.wiffin.com/samples/

  3. w1cky
    Member
    Posted 2 years ago #

    I copied & pasted the code for the first example (on http://simple-maps.wiffin.com/samples/), so yes, I'm sure it's correct.

    Unfortunately, I can't send you a link right now, because the issue is still on my local dev server.

    I'll try it again when I get the chance, and test to see if it's a problem with other plugins. If I can't find an answer I'll get in touch when I can provide a link for you to see.

  4. w1cky
    Member
    Posted 2 years ago #

    I've re-tested and it's working. The problem was that I blindly (stupid) copied the first example from your page: http://simple-maps.wiffin.com/samples/

    The example has a typo. It's missing the "/" from the closing tag. The tag reads [simple-map] instead of [/simple-map].

    Ideally I would like to set this up within the template. I'm creating a site for someone who runs courses at various venues. I've already created a custom meta box for the address of the venue. It would be much neater to reuse this content, rather than asking the client to type the shortcode for each venue.

    Is there a way that I could set up the shortcode within the template, to automatically use the address from the meta box? I know I can use the "do_shortcode" template tag, but I'm not sure how I would inject the meta data.

    Any ideas?

  5. erik.wiffin
    Member
    Plugin Author

    Posted 2 years ago #

    Wow, I can't believe I let a typo like that through, thanks for catching it for me.

    As far as your your custom template code, I think that this might work, but I haven't tested it.

    <?php
    $meta = get_post_meta(get_the_ID(), 'custom-meta-value', true);
    if (!empty($meta)) {
    	echo do_shortcode('[simple-map]' . $meta . '[/simple-map]');
    }
    ?>

    This is the function I'm using to get meta values from posts. http://codex.wordpress.org/Function_Reference/get_post_meta

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic