ACF Limitations

New home Forums Pro Add-on Troubleshooting ACF Limitations

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #61870
    Kyle Homstead
    Participant

    After reading through all of the discussions, I can see that there are many people (like me) who have purchased the PRO version because of its Advanced Custom Fields (ACF) integration feature. Having installed and set this up, I now understand that there are several key limitations. I would like to reiterate them here in case I misunderstand any of these points, and perhaps the developer has an update about coming improvements?

    1 – You can’t use custom map pin icons with ACF: You can only use the default red pin. Custom uploaded pins just don’t display.

    2 – You can’t filter by post-type or category: The ACF feature automatically gathers all ACF Google Maps Field entries, regardless of what post-type they are associated with. For example, if you had one location field for ‘pages’ and another for a custom CPT, WP Google Maps would show them all together on a single map.

    3 – Can’t use images with Infowindow or Marker Listings: The ACF integration dynamically pulls entries from the database, but does not offer any way to pull images. This means that you cannot use images (logos, for example) in the map’s Infowindow or in the Marker Listings below the map.

    4 – No custom field choices: The ACF integration pulls in the Google Maps field (location/address), the post_title, and permalink to the post. It does not offer any additional control over fields that can be displayed or included in the Infowindow or Marker Listings. This very much limits what visitors can learn from the map.

    —————————-
    If I have misunderstood any of the limitations, please correct me. Otherwise, I hope that this post will help everyone better understand what the ACF integration can and cannot do. I personally am struggling with the limitations and will be exploring other solutions.

    I am not an experienced developer, but I should note that there are many articles that explain how to create a basic Google Map that displays multiple locations based on ACF field (simple code, no plugin necessary). The reason that I purchased WP Google Maps is that it offers so many wonderful enhancements. Unfortunately, it seems that many of the most appealing features are not currently available with the ACF integration.

    #61880
    AbelC
    Moderator

    Hi There,

    Thank you so much for getting in touch with us.

    1. Unfortunately, it is not supported to change the Advanced Custom Field marker icons at the moment. We do apologize for the inconvenience.

    I will definitely add it to the Feature Request items for our development team to have a look at. They will assess the request, and if approved they will add it to our plugin in the future.

    Alternatively, please do let me know if you would like to receive Custom JS to change the marker icons for all the markers (including ACF markers) on the map. Please note that all the markers will then use the same marker icon.

    2. Yes, WP Google Maps will display all the markers on the map.

    With that said, we can provide you with custom code that will allow you to categorize markers by making use of the WordPress taxonomy system.

    3. Unfortunately, it is not supported to pull the “Featured Images” at the moment. I will also add this request to our Feature Request items.

    4. Would you perhaps be open to receive Custom code that will allow you to pull the page/post description and display this in the marker InfoWindow?

    This means that you will be able to add an image to the page/post description and this will be displayed in the InfoWindow.

    I hope this helps clarify, and I look forward to hearing back from you.

    Kind Regards,
    Abel

    #61883
    Kyle Homstead
    Participant

    Thanks for the thoughtful reply, Abel. I would definitely like to receive custom code for each of the scenarios to work around these issues.

    Thank you.

    #61888
    AbelC
    Moderator

    Hi Kyle,

    Thank you for getting back to me.

    1. Could you please provide us with the URL to the preferred marker icon? Could you also please provide me with a link to your map page?

    I will then be able to prepare the Custom JS code needed to achieve this and get back to you ASAP.

    2. You can use this small, experimental plugin to enable that functionality https://github.com/CodeCabin/wp-google-maps-force-wordpress-category-tree. Your category filter on the frontend of your maps, should then display your added WordPress categories.

    You can disable and remove that afterwards. Please note if you want to switch back to our plugins category system from your WordPress taxonomy tree, you’ll need to do so programatically.

    4. Would you perhaps be comfortable to please add the following code via FTP by navigating
    to wp-content/plugins/wp-google-maps-pro/includes/3rd-party-integration/class.acf.php line 271:

    case 'description': 
    					$query->fields[$field] = "( SELECT post_content FROM {$wpdb->prefix}posts WHERE ID = post_id AND post_status = 'publish' ) AS $field"; break;

    This should now include the page/post description.

    Alternatively, would you perhaps be open to please submit a support ticket here -> https://www.wpgmaps.com/support/ -> and please mention my name (Abel) in this ticket as this will allow me to provide you with a pre-release to fix this issue.

    I hope this helps clarify, and I look forward to hearing back from you.

    Kind Regards,
    Abel

    #61917
    AbelC
    Moderator

    Hi Kyle,

    Thank you so much for getting back to me, and my sincere apologies for the delayed response over the public holiday.

    1. Could I kindly ask if you could please navigate to Maps -> Settings -> Advanced -> Custom JS -> Please paste the following code below:

    jQuery(function($){
    jQuery(window).on(‘markersplaced.wpgmza’, function(){
    var map = WPGMZA.maps[0];
    if (typeof map !== ‘undefined’) {
    map.markers.forEach(function(marker){
    console.log(marker);
    marker.setIcon(‘https://thirdrow.live/wp-content/uploads/2020/12/Music_4-1.png’);
    });
    }

    });
    });

    This should set all the marker icons to “https://thirdrow.live/wp-content/uploads/2020/12/Music_4-1.png”

    2. Not a problem at all.

    3. Unfortunately, this will only use the WordPress page/post description at the moment.

    With that said, could you please confirm the ACF fields you would like to include? I will then be able to advise further.

    I look forward to hearnig back from you.

    Kind Regards,
    Abel

    #61935
    AbelC
    Moderator

    Hi There,

    Thank you so much for getting back to me, and my sincere apologies for the inconvenience.

    Could I kindly ask if you could please provide me with a link to this page as this will allow me to take a closer look at what is causing thse issues?

    Could you also please confirm the steps you took as we will then be able to try and replicate this issue locally.

    Unfortunately, shortcode parameters is not supported when using the WordPress taxonomy system at the moment.

    Again, we do apologize for the inconvenience.

    I look forward to hearing back from you and resolving this issue.

    Kind Regards,
    Abel

    #66915
    alauddin
    Participant

    Hi Abel,

    I am following this thread and wondering if you have plans to enhance
    Maps > Marker Filtering
    and allow filtering by
    1) CPT
    2) Category
    3) Tags

    That should solve this much needed functionality without custom code.

    #66916
    dmccan
    Participant

    Hi Abel,

    It would be helpful for me also to be able to filter by Custom Post Type and taxonomies. It would also to useful to be able to pick the fields to return, such as an ACF URL field.

    Thank you,

    David

    #66934
    AbelC
    Moderator

    Hi There,

    We are planning to add these filtering options to our plugin in the future.This should be included in the next major version Pro V9.

    With that said, you should be able to display your added WordPress categories by making use of the WordPress taxonomy system with the following experimental plugin – https://github.com/CodeCabin/wp-google-maps-force-wordpress-category-tree

    As mentioned in the previous thread, if you want to switch back to our plugins category system from your WordPress taxonomy tree, you’ll need to do so programatically.

    I hope this helps clarify?

    Kind Regards,
    Abel

    #73858
    Styg
    Participant

    [quote quote=61880]1 – You can’t use custom map pin icons with ACF: You can only use the default red pin. Custom uploaded pins just don’t display.[/quote]
    We use version 9, unfortunately it is still not possible to use different icons depending on the category – will this functionality be added later?

    [quote quote=61880]2 – You can’t filter by post-type or category: T[/quote]
    Filtering by category now works – thank you very much!

    #74096
    abby-buzz
    Participant

    I just wanted to say Thank You to Kyle for setting this out so clearly. I would have spent many hours of frustration before figuring all this out on my own. Each of the things he listed are critical to my current project and will likely change how we do things.
    I would like to 2nd adding these as Feature Requests.
    I see this was from almost 2 years ago. Have any of these been adopted into the current V9?

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.