How to display a nested field?
- This topic has 5 replies, 2 voices, and was last updated 2 years, 7 months ago by
Long Nguyen.
-
AuthorPosts
-
September 7, 2022 at 8:05 PM #38208
[email protected]
ParticipantHi
I have created a CF-Group "Meals" which contains 4 custom fields (text) with the following IDs:
mo_meal_name1
mo_meal_price1
mo_meal_name2
mo_meal_price2The ID of the group-field is just "mo_meals"
Now I try to display the subfields using the GenerateBlocks dynamic-data feature, but when I add any of the above mentioned subfield-IDs to a headline, nothing will be displayed.
I found no solution for this in your docs, so can you please help me with this?
Thank you in advance and kind regards,
SaschaSeptember 7, 2022 at 11:12 PM #38214Long Nguyen
ModeratorHi,
It looks like GenerateBlocks is not fully compatible with Meta Box and pro extensions like MB Group to display subfield value. You can try to contact their support to ask for help with this case.
Or create a shortcode to display subfield value and add the shortcode to GenerateBlocks. Refer to this documentation https://docs.metabox.io/extensions/meta-box-group/#outputting-group-with-page-builders
September 8, 2022 at 12:40 AM #38217[email protected]
ParticipantHello,
thank you for your reply.
Unfortunately, I'm not a coder, so I wonder if you can help me further here?
The docs seem to include code, but not all of it seems to be required if MetaBox AIO is installed, correct? The doc you've mentioned explains how to create the group, subfields etc. But I have already created the group using the Metabox UI in the dashboard of the site. Therefore they're displayed in the block-editor already and can be filled by admins, editors etc., correct?
In my understanding, as soon as the MB Group is created, I can display all fields in the frontend using shortcodes. I just don't understand, how to display these fields via shortcode. The docs are confusing for me 🙈
Can you please show me or provide the shortcode to display the cloneable subfields mentioned above?
Thank you in advance and kind regards,
SaschaSeptember 8, 2022 at 12:40 PM #38224Long Nguyen
ModeratorHi,
The sample code is already added to the documentation (section Outputting group with page builders), please check it here https://docs.metabox.io/extensions/meta-box-group/#outputting-group-with-page-builders
If you are not familiar with coding, you can use a page builder like Elementor, it fully compatible with Meta Box, MB Group to display subfield values.
Or hire an expert developer to help you to build your site.September 9, 2022 at 4:41 PM #38247[email protected]
ParticipantThanks for further clarification, that was helpful indeed.
So in this example, I would replace the
group_field_id
withmontag_gerichte
, if the group is created like seen on this screenshot? Or is it the IDmenue-cf-group
?Thank you in advance and kind regards,
SaschaSeptember 11, 2022 at 1:43 PM #38259Long Nguyen
ModeratorHi,
You should replace
group_field_id
with your group field IDmontag_gerichte
. The IDmenue-cf-group
is the field group (meta box) ID. -
AuthorPosts
- You must be logged in to reply to this topic.