Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author erik.wiffin

    (@erikwiffin)

    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: https://simple-maps.wiffin.com/samples/

    Thread Starter w1cky

    (@w1cky)

    I copied & pasted the code for the first example (on https://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.

    Thread Starter w1cky

    (@w1cky)

    I’ve re-tested and it’s working. The problem was that I blindly (stupid) copied the first example from your page: https://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?

    Plugin Author erik.wiffin

    (@erikwiffin)

    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. https://codex.www.ads-software.com/Function_Reference/get_post_meta

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Stupid Simple Google Maps] I get 2 empty blue boxes instead of the Goggle Map’ is closed to new replies.