Custom Field Groups/Objects
Hi there,
I'm currently using ACF to create a group like so:

I am using this custom field group (for the sake of this example) that has 3 text elements in a custom post type created through CPT UI. 
And then I am trying to utilize this custom field in a Brizy Template for my custom post. However, I have been unable to figure out how to actually access this "group" with dynamic content. I have tried using a simple text block with the hashtag notation to try to access the children of this group/dynamic content button as well, but the the elements (i.e. sequence, video, and category) do not show up and neither does the group that I've created ("single_combo"). Is it possible to access the group or it's children somehow?
Brizy Pro: Version 2.1.0
ACF: Version 5.9.3
Custom Post Types UI: Version 1.8.1
-
Hi,
Thank you for all these details and screenshots!
Could you please check if you added the right location for the ACF you created? If you want to attach the ACF to the CPT you created, could you please check this aspect? I create an ACF "Test" and a CPT "Car". Therefore, I added in the Location "Post Type is equal to Car". See here. After creating the CPT https://jmp.sh/qjm277g, did you create the template for this CPT? What display condition did you set fro the template? For example in my case, I selected the "Include - Cars - All". See here. After this, when I start editing the template with Brizy in the Text element when I added #name_cars, then it appears in the predefined list. See here. Could you please check if you added the right ACF location and the right Brizy template display condition?
Do you have installed and activated the Brizy Free plugin too? Could you please update Brizy Free and Brizy Pro to our latest versions? Brizy Free 2.1.5 and Brizy Pro 2.1.3.
Thanks!
Best regards,
Sandra1 -
Hi,
Thanks for the response! I did set the ACF to the corresponding CPT as you can see below:
After I created the CPT, I did create a template, with the display condition:
I haven't had an issue if I am just trying to access a "Text" or "Image" type in my template, but I'm running into this issue when I try to set the type of my field to "Group" (on the right hand side of the image), and try to access the children of this group, like below.
For instance, I created another field onto my field group called "Test" that had a field type of "Text", and was able to access that in the template.
But, nothing shows up when I try to access my fields from this ACF that have the type of "Group". I have both versions of Brizy installed currently, and have updated them. Not too sure why this is the case after updating either.
Thanks again!0 -
Hi,
Thank you for all these details. Now, I could understand what you created. Unfortunately, the Group field is from the "Layout" section and Brizy doesn't have a similar element and can't "understand" it. When you create an ACF, you already create a group of the custom field and now you have a group in a group and at the moment, Brizy can't read such data. We recommend using other fields to be able to insert then in the template, anyway you wanted to display them separately.
Thank you!
Best regards,
Sandra1 -
Ah I see, thanks for answering!
I have not tried alternatives to this yet, but would this be the case if I wanted to create a custom field NOT through ACF and I wanted this custom field to contain a JSON object or an array of text fields/images/etc. and tried to access these objects through Brizy template? Or would I possibly run into the same issue as described above?0 -
Hi,
Unfortunately but this will not work in the Brizy template (JSON object and array) because will be difficult to display them because isn't available the same element in the Brizy too and to activate the dynamic content for them. When you set the text in the ACF or CPT, you can display it in the Brizy because we have the Text element and it has the possibility to activate the Dynamic content. The same with other fields but in Brizy isn't available the element with dynamic content will display the JSON object or an array. For array, you can follow the suggestion I said above (in case the array isn't complex). You can add as text fields the headings of the array and using the table element from Brizy to display them. Similar to here.
Thanks!
Best regards,
Sandra1 -
Gotcha, thank you!
0 -
Thank you too!
Stay safe and have a great day,
Sandra0
Please sign in to leave a comment.
Comments
7 comments