Support » Plugin: Comprehensive Google Map Plugin » Is there a way to show adresses in posts on a google maps automatically

Viewing 1 replies (of 1 total)
  • Hi,

    You could use custom fields to enter your address and display it on the post.
    The value of the custom field ‘adress’ will be injected easily in the CGMP shortcode.

    For exemple, in my article editor, I wrote : ( with help of Exec-PHP for php directly inside posts, but could be inserted in pages or posts template )

    <?php
    global $post;
    $loca = get_post_meta($post->ID, 'adress', true);
    ?>

    and in the shortcode, I replace
    addmarkerlist="123 foo bar{}1-default.png"
    by
    addmarkerlist="<?php echo $loca?>{}1-default.png"

    It works, hope I’ve helped you,

    Regards,

    Elendil57

Viewing 1 replies (of 1 total)
  • The topic ‘Is there a way to show adresses in posts on a google maps automatically’ is closed to new replies.