WordPress.org

Forums

Basic Google Maps Placemarks
[resolved] Front - end Placemark Post submission (3 posts)

  1. PH.Rhev
    Member
    Posted 1 year ago #

    I'm creating a front end post submission, and i tried to put the placemark custom post types in the front end using the wp_insert_post. The post submission is a success but i am having a big problem in the address. It saves the address but not having a geolocation (longitude, latitude), how can I process the address when I submit the post in the front end?... is there anyway for it? , sorry im noob in PHP. I hope you can help me. More Power to you! Thank you.

    http://wordpress.org/extend/plugins/basic-google-maps-placemarks/

  2. Ian Dunn
    Member
    Plugin Author

    Posted 1 year ago #

    Try this:

    global $bgmp;
    $coordinates = $bgmp->geocode( $address );
    update_post_meta( $post->ID, 'bgmp_latitude', $coordinates[ 'latitude' ] );
    update_post_meta( $post->ID, 'bgmp_longitude', $coordinates[ 'longitude' ] );
  3. PH.Rhev
    Member
    Posted 1 year ago #

    Thanks Ian! it works perfectly! :D

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic