Pull different fields from ACF into maps custom fields

New home Forums Pro Add-on Pull different fields from ACF into maps custom fields

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #72401
    moises8
    Participant

    Greetings,

    We already did the tutorial for the ACF integration and the map is showing all our offices as intended on the map, but its general data (title, address, link to post).

    I was wondering if it was possible to add another field from ACF to the map markers, in this case we want to pull the phone number from our custom fields into the maps custom fields so that it gets shown into the map.

    As i was looking through the forum i found that there’s a custom code to add the description to the map data, but we dont need the description from the post in our case.

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

    And also if its possible to make that phone information into a link, so that it behaves like a phone link on the browser

    Regards

    Attachments:
    You must be logged in to view attached files.
    #72406
    Steven
    Moderator

    Hi @moises8,

    Thank you so much for getting in touch, we really appreciate your time.

    Unfortunately, this is not yet possible, however, this is something we are presently working on.

    Unfortunately, custom field data for example is stored in a different table so requires adjustments to the query in order to query the post_meta table. The issue, however, is that in doing so, this data then needs to be cross referenced so it causes a dramatic performance drops for each time this query is fired.

    With that said, we are hoping to incorporate this in a future version of WP Google Maps as soon as we are able.

    I hope this helps to clarify?

    Kindest Regards,
    Steven De Beer

    #72407
    moises8
    Participant

    Hi Steven,

    Thanks for the answer, well we’ll look forward to that, if you maybe have a roadmap or a date when such a feature could be release?

    Also would it be possible to add the description as well to the map?

    I tried this from another post:

    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;

    But the descriptions doesn’t appear

    #72411
    moises8
    Participant

    Never mind, it worked!

    My only doubt left would be if you maybe have a roadmap or a date when such a feature could be release?

    #72420
    Steven
    Moderator

    Hi @moises8,

    Thank you so much for getting back to me.

    This is currently on the roadmap for our next major version which we are hoping to get released within the next few months.

    If I am not mistaken, this feature has been dramatically improved in the new major version with a host of core code changes already and should definitely help in in the future.

    Kindest Regards,
    Steven De Beer

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