Viewing 6 replies - 1 through 6 (of 6 total)
  • Miki80

    (@miki80)

    Hi, having bit of the same question.
    I am using WP User Frontend to create a custom field where people enter a country.

    Using a function I can retrieve this field, but how can I insert a map that points to the specified country.

    And as is there an option to put all posted countries in a mashup at my welcom page?

    Can you please help.

    patrick30

    (@patrick30)

    This is something I am trying to do as well, where people can search using zip code or city. I am very close to it, I have got the search function to work and I have got the locations to load also, the only thing is that the map isn’t loading. If I find a solution, I will post it here for you.

    Miki80: All the fields in address, longitude and latitude use custom fields, you can do add_post_meta to populate the fields.

    Now here you can either ask the user to enter their address and then convert that address to latitude and longitude using geocoding, or you use the geocoding included in the plugin to do it in the frontend.

    To convert an address to lat/long, you can try this link, there are many suggestions given

    http://stackoverflow.com/questions/98449/how-to-convert-an-address-to-a-latitude-longitude

    patrick30

    (@patrick30)

    Miki80: I just did a quick test on this. I am also making a site where users can post locations from frontend.

    There is no need to do geocoding I guess.

    You can try doing this when you save the post

    function new_post( $post_id ) {
      $address = filter_input( INPUT_POST, 'address', FILTER_SANITIZE_STRING );
    
      update_post_meta( $post_id, '_pronamic_google_maps_address', $address );
      update_post_meta( $post_id, '_pronamic_google_maps_active', true );
    }
    
    add_action( 'save_post', 'new_post' );
    
    // Create post object
    $new_post = array(
      'post_title'    => ''
    );
    
    wp_insert_post( $new_post );

    You can try this and play around with this

    Plugin Author Remco Tolsma

    (@remcotolsma)

    @handhugsdesign i’ll mark this topis as resolved, if someone still has a question please open a new topic:

    http://wordpress.org/support/plugin/pronamic-google-maps

    Thread Starter handhugsdesign

    (@handhugsdesign)

    Sorry – I dont see how any of these answered my original question. Does anyone have a solution to a simple zip code proximity search?

    patrick30

    (@patrick30)

    @handhugsdesign I will post a solution soon. I have managed to do the zip code search, now am just working on City search

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Zip Code entry by user?’ is closed to new replies.