gmw_pt_update_location Not Geolocating Address
-
Hi Eyal, I am updating the website I designed a year ago using Geo My WordPress. Since updating my plugins, the function gmw_pt_update_location() has stopped doing what it should.
I have a user-submittable front-end form which passes an address field to the gmw_pt_update_location function like this:
include_once( GMW_PT_PATH .'/includes/gmw-pt-update-location.php' ); if ( function_exists( 'gmw_pt_update_location' ) ) { $args = array( 'post_id' => $post_id, 'post_type' => 'activity', 'post_title' => get_the_title( $post_id ), 'address' => get_post_meta( $post_id, 'wpcf-address', true), ); gmw_pt_update_location( $args ); }
The form submits without error, but GWP does not geolocate the address. It used to work, but now doesn’t.
When I view the post in the WP Dashboard, the ‘Location’ column states ‘No location found’.
When I enter an existing address into the form field, GWP does set the location and the address correctly – suggesting it can look up existing addresses from the DB but cannot geolocate new ones.
I have a Google Maps API key entered into ‘GMW Settings’.
Any idea why this isn’t working?
Many thanks, Richard
- The topic ‘gmw_pt_update_location Not Geolocating Address’ is closed to new replies.