• Resolved c.yarri

    (@cyarri)


    I have a front end form that is used to submit post content to my site by users. Two of the fields they fill out are City and State. I had been using the address geocoder plugin, and was able to concatenate the city and state, and add directly to the meta field on the post on form submission, but I can’t get it to work with GMWP. I think it has something to do with the meta key, but I don’t know what the key is for the autocomplete address box. I use the following on the form page to update the meta…
    update_post_meta($pid, ‘wppl-address’, $geocode_address );
    in that function call, ‘wppl-address’ is what I thought the meta-key would be, but it’s probably wrong. Any help is much appreciated.

    Regards,

    Cole

    https://www.ads-software.com/plugins/geo-my-wp/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think perhaps the location is not stored as meta key, there is some info here on how to integrate it in to the WP Front End User plugin using custom fields, I’ve not yet figured out how to apply this to a front end posting form I’ve made myself but hopefully this will give you clues:

    https://geomywp.com/support/forums/topic/add-location-field-to-custom-post-that-users-add-on-the-front-end/

    Plugin Author Eyal Fitoussi

    (@ninjew)

    @c.yarri and @pinkishhue,
    GEO my WP saves the posts location information in its own custom table in database rather than in custom fields. For the main reason which is better for performance when running the search queries.

    GEO my WP provides you with a functions that does everything for you from geocoding an address to saving it in its table in database.

    The function below can be found in geo-my-wp/plugins/posts/includes/gmw-pt-update-location.php.

    gmw_pt_update_location( $args );

    You will need to use the function and pass the arguments ( explanation can be found in the file mentioned above ). Basically you need to pass the post ID and the address entered after form submission ( after the post was created ).

    Hope it helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘meta key for front end post submission’ is closed to new replies.