Okay
  Public Ticket #2712951
output acf groub subfields in post list
Closed

Comments

  • David TRappaud started the conversation

    How do I get something like {{item.post_lists.cf_GROUP_SUBFIELD}} to output the values of the SUBFIELD in a acf GROUP?


    I use a custom post blocks widget. In the posts i have an afc-group (candidate_contact_info) with a numer of sub-fields with the acctual contact info such as instagram, twitter and so on. When I want to display the value of a post in the post list, I use {{item.post_lists.cf_XXXX}}. This works fine for all other values. But when I use {{item.post_lists.cf_candidate_contact_info_instagram}} no value is displayed. If I use a short-code to display the value:  [acf field="candidate_contact_info_instagram" post_id="{{item.post_lists.id}}"] it works just fine with adding "_instagram" after "candidate_contact_info" but not when use the {{}} notation – and I need the item.post_lists.cf_candidate_contact_info_instagram to work as I need to have an {% if item.post_lists.cf_candidate_contact_info_instagram != "" %} to check if the value is defined.

    Please advice… Thx in advance

    David

  •   Max replied privately