Home Forums Plugin Support WP User Frontend Pro WPGeo Problems

This topic is: resolved

This topic contains 11 replies, has 2 voices, and was last updated by  kiwi 5 years, 1 month ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #14895

    kiwi
    Participant
    Post count: 99

    Still having problems getting the form to pass on coordinates to the WP Geo custom fields for the post. Have tried everything we know to fix for the last 3 weeks but can't seem to crack it.

    Our users add maps to every post created so its a big problem for us. Would really appreciate someone in your team taking a quick look at the form for us please to see if you can shed some light on this for us. Look forward to hearing from you soon.

    #14913

    Tareq Hasan
    Keymaster
    Post count: 2831

    Sorry for that, can you post the login details here (as private)?

    #14958

    kiwi
    Participant
    Post count: 99
    This reply has been marked as private.
    #15013

    Tareq Hasan
    Keymaster
    Post count: 2831

    You mentioned some code in other thread and that contains the meta key location_map. But the meta key name you are using in the form is enter_address. Are you using the same one in your code?

    #15016

    kiwi
    Participant
    Post count: 99

    I've now changed the meta key to ‘location_map' but its still not working. Code below is what we are using.

    function wpufe_update_wp_geo( $post_id ) {
    if ( isset( $_POST[‘location_map'] ) ) {
    list( $lat, $long ) = explode(‘,', $_POST[‘location_map']);

    update_post_meta( $post_id, ‘_wp_geo_latitude', $lat );
    update_post_meta( $post_id, ‘_wp_geo_longitude', $long );
    }

    if ( isset( $_POST[‘geo_title'] ) ) {
    update_post_meta( $post_id, ‘_wp_geo_title', $_POST[‘geo_title'] );
    }
    }

    add_action( ‘wpuf_add_post_after_insert', ‘wpufe_update_wp_geo' );
    add_action( ‘wpuf_edit_post_after_update', ‘wpufe_update_wp_geo' );

    #15017

    Tareq Hasan
    Keymaster
    Post count: 2831

    Where did you added the code?

    #15018

    kiwi
    Participant
    Post count: 99
    This reply has been marked as private.
    #15019

    Tareq Hasan
    Keymaster
    Post count: 2831

    May be you didn't notice my previous post, replace location_map with enter_address

    #15020

    kiwi
    Participant
    Post count: 99

    Yes but I did the reverse. I left the location_map code in the custom file but changed the enter_address to location_map in the form meta key. Test it but is still not working.

    #15076

    kiwi
    Participant
    Post count: 99

    I've also tried your way as suggested Tareq but still not working. I can see the co-ordinates have passed to location_map & enter_address custom fields correctly depending on which one is setup.

    #15099

    Tareq Hasan
    Keymaster
    Post count: 2831

    I see the form contains with gmap location_map, also the code seems ok. No idea whats wrong.

    #15104

    kiwi
    Participant
    Post count: 99
    This reply has been marked as private.
Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘WPGeo Problems’ is closed to new replies.