WP User Frontend Pro
-
Hi there,
I was wondering if you could help me with integrating WP USER FRONTEND PRO with GEO MY WP. I’m happy with the way that WP USER FRONTEND PRO gets the location data from the user, but I’d like to use the search form functionality that comes with GEO MY WP.
On the WP USER FRONTEND PRO website there is the following code snippet for using PRONAMIC GOOGLE MAPS, it populates the PRONAMIC lat long fields with the data from WP USER FRONTEND PRO’s collection method.
function wpuf_pronamic_location( $post_id ) { $custom_field = 'address'; if ( !class_exists('Pronamic_Google_Maps_Post') ) { return; } if ( isset( $_POST[$custom_field] ) ) { $address = $_POST[$custom_field]; list( $def_lat, $def_long ) = explode( ',', $address ); if ( $def_lat ) { update_post_meta( $post_id, Pronamic_Google_Maps_Post::META_KEY_LATITUDE, $def_lat ); } if ( $def_long ) { update_post_meta( $post_id, Pronamic_Google_Maps_Post::META_KEY_LONGITUDE, $def_long ); } if ( $def_lat && $def_long ) { update_post_meta( $post_id, Pronamic_Google_Maps_Post::META_KEY_ACTIVE, true ); } } } add_action( 'wpuf_add_post_after_insert', 'wpuf_pronamic_location' ); add_action( 'wpuf_edit_post_after_update', 'wpuf_pronamic_location' );
Is there a way I could modify this for use with GEO MY WP instead?
Many thanks in advance,
Jody
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WP User Frontend Pro’ is closed to new replies.