• Resolved jcrea

    (@jcrea)


    Is there anyway to display the address of a map that’s associated with a post? In other words, I have a post and I have a map displayed on that post. I would like to display the address of that map in the post content somewhere. eg. 1234 Apple Street. (like get_post_meta)
    Thanks

    http://ww.wp.xz.cn/plugins/post-google-map/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Can’t recall the meta key(s) offhand, but the address data is stored as post meta. Just need to pinpoint the right ones.

    Thread Starter jcrea

    (@jcrea)

    I seen that. It’s an array of data in one key “gmp_arr” I believe. Not sure how to extract that and make it readable in post.
    BTW thanks for the quick response!

    Thread Starter jcrea

    (@jcrea)

    OK I’m getting somewhere… I used <?php $gmp_arr = get_post_meta( $post->ID, 'gmp_arr', true );?>
    <?php echo implode( ', ', $gmp_arr ); ?>
    which pulls all the data. I now need to figure how to just pull the title, address, zip, city and state.

    Thread Starter jcrea

    (@jcrea)

    Figured it out.
    `<?php $gmp_arr = get_post_meta( $post->ID, ‘gmp_arr’, true );?>’
    <?php echo $gmp_arr['gmp_address1']; ?>
    Repeat the echo for each one you need.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Glad you got that worked out. If you didn’t I was planning to re-check the code and see how it’s done, to help you. I’m not the most familiar with it, and we’re not actively working on it at all right now.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Display Location On Posts’ is closed to new replies.