wpmu maps are not displaying at all

0

I am running directory and custompress to run my site and want to integrate the google maps using a custompress field. I know that it already has that functionally built in but i have the address broken up into multiple fields (address, city, zip code, etc). Is there a way to use those field without having to fill on the whole address on only one field.

  • Vladislav
    • Dead Eye Dev

    Hello,

    Unfortunately, out of the box the multiple post custom fields for address aren’t supported. However, the plugin does expose the “agm_google_maps-post_meta-address” filter, which can perhaps be useful in this situation. In this scenario, you’d hook up to this filter and construct the full address string from your multiple fields values and return it to the plugin. The plugin would then have a full address to work with and create the map properly.

  • Vladislav
    • Dead Eye Dev

    Hi,

    This would be a custom code, so it should ideally go in a place that WordPress will execute automatically for you. One such place is your theme’s functions.php file. Another good idea might be to place that code in a mu-plugin – a mu-plugin is basically just a PHP file in your wp-content/mu-plugins directory (you can just create it if it doesn’t exist already). All the files in this folder will be automatically included by WordPress, so it’s a good place to store your behavior customisations and not depend on your theme – so if you switch your theme to something else, your custom modifications will still work.