Home Forums Plugin Support WP User Frontend Pro WP Geo problems

This topic is: resolved

This topic contains 5 replies, has 2 voices, and was last updated by  kiwi 5 years, 4 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14385

    kiwi
    Participant
    Post count: 99

    We are using this code to pass on the long/lat coordinates to the WP Geo plugin to display maps to posts.

    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'] );
    }

    This was working up until the last update but now not working at all. We can see the data is being saved to the post in a custom field (enter_address) ok – just not passing it to wp geo on post submit/update. No java errors appearing, plugins added or code changes made. Any help appreciated.

    #14399

    Tareq Hasan
    Keymaster
    Post count: 2831

    Which update you are talking about? The User Frontend plugin update or the WP Geo plugin update?

    #14410

    kiwi
    Participant
    Post count: 99

    We updated the WP User Frontend plugin a few days ago. I have just updated the WP Geo plugin today but have checked the process and it's still not working.

    #14642

    kiwi
    Participant
    Post count: 99

    Any ideas re. this guys? We have troubleshooted for the past week with no success.

    Would really appreciate some help to fix this map problem. Cheers

    #14706

    Tareq Hasan
    Keymaster
    Post count: 2831

    [php]
    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' );
    [/php]

    Using this code, it's updating wp geo lat/long perfectly.

    #14746

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

The topic ‘WP Geo problems’ is closed to new replies.