sticking location data to posts from custom script
-
Nevermind, I found the answer myself. I’m just gonna leave this here in case someone else finds it useful, or you might have a better suggestion on how to do this?
I have a form on one page for creating new custom posts and I want to write location to that newly created post at the same time.
I guess this plugin wasn’t made for such thing. As I’ve seen that kind of thing was meant to be possible only from WordPress dashboard, because all of the functionality that is available on WordPress pages is through shortcodes and post meta data.
So, I had to write location data for a post directly in a database(save_data function from plugins/posts/includes/admin/gmw-pt-metaboxes.php) and using do_shortcode(‘[gmw_current_location display_by=”street,city,country,lat,lng”]’) to get info about current location and then parse it.
The topic ‘sticking location data to posts from custom script’ is closed to new replies.