On the Google Maps plugin do you know if it is possible to have the plugin pull addresses from posts

I need to figure out how to pull data from a metabox in a custom post type and get the Google Maps plugin to use that data to place a marker on the map. I want it to place a marker for each post.

  • Patrick
    • Support Monkey

    Hi @mccawphoto

    There is an easy built-in way to accomplish just that.

    1) Create a custom CustomPress field associated with your post-type which will be the address field

    2) Copy the Field ID (e.g. _ct_text_517fd4328bbb5)

    3) In Settings > Google Maps, set things to look like this under “Custom Fields”:

    - Use custom Post Meta fields support: Yes

    - Map custom fields: My posts have an address field: _ct_text_517fd4328bbb5

    - When these fields are found, I want to:
    --- Associate the new map to post: Yes
    --- Automatically show the map: Yes

    - If previous option is set to “Yes”, the new map will be shown: below/above the post body

    All the posts with address field set will have the map auto-generated and added to them.

  • mccawphoto
    • The Incredible Code Injector

    I don't want to use the CustomPress plugin. I have already created my own Custom Post Type and want to use the address field from that.

    I also want to only create one map on one page and display all addresses on that map. How do I do that?

    Thanks!

  • Patrick
    • Support Monkey

    Hi @mccawphoto

    Whoops, this one slipped through the proverbial cracks! Sorry about that :slight_frown:

    I don't want to use the CustomPress plugin. I have already created my own Custom Post Type and want to use the address field from that.

    Simply enter the name of the custom field you have created for your address in the "Address Field Name" textarea of the Google maps plugin settings.

    I also want to only create one map on one page and display all addresses on that map. How do I do that?

    The widget that comes with the Google Maps plugin has settings that enable you to show all locations in the same map if you like.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.