gillespieza
Member
Posted 4 months ago #
I've tried adding this to my theme's template by putting the generated shortcode into a custom field, and then calling do_shortcode ($some-custom-field-here) but its just displaying an empty div? The various google-map-placeholder divs are there, but they are not displaying anything. Any ideas? I've tried with Twenty Eleven and my own theme and it doesn't work in either.
http://wordpress.org/extend/plugins/comprehensive-google-map-plugin/
Hello,
It is not going to work. You just have the generated shortcode.
What about the backend code to parse the shortcode?
Are you trying to incorporate the plugin in your custom theme?
hraban
Member
Posted 4 months ago #
I think that is the plugin I spent two days looking for ;) I have to do exactly the same thing tomorrow so I will keep trying - I'll write if I succeed.
hraban
Member
Posted 4 months ago #
Hope it's not too late.
Well, that was too much digging into the code, so I quickly wrote my own one.
It adds the action when the post is saved and geocodes it (transferes the human-readable address to latitude and longitude) using the address field. These values are then saved in post meta data and can be accessed whenever necessary. On the template page I am drawing a Google Map and put necessary markers with some custom fields in the InfoWindow.
Well, if this is what you actually try to do, I can post it here.
gillespieza
Member
Posted 4 months ago #
Thanks @hraban - I ended up using the Google Maps Shortcode plugin instead