Tell us what you are trying to do?
Build an accordion that leaves out any empty fields from the accordion structure. For example if there's Bio, Education, and Awards in an accordion, and a custom field group of Education has no information for that post, I need it to not show the "Education" accordion.
Is there any documentation that you are following?
None. I wish this was documented. I think it'd be helpful.
Is there a similar example that we can see?
These attorney bios have a conditional accordion. hidden link
What is the link to your site?
hidden link
I have not instituted the accordion yet as I've just run into issues in doing so. I am building out the archive templates with Elementor, but I think this issue would occur with any accordion.
Hello,
How do you setup the "Education" field?
If it is a custom field, you can use the conditional block to display or not display the entire "Education" accordion
https://toolset.com/course-lesson/using-toolset-conditional-block/
If it is a repeatable field groups,you will need to create a post view, I suggest you try to create the view with classic editor, for example
1) Dashboard-> Toolset-> Settings-> General:
in section "Editing experience", enable option "Show both the legacy and Blocks interface and let me choose which to use for each item I build"
2) Dashboard-> Toolset-> Views, create a post view:
- Query "Education" items
- Filter by the "Repeatable field groups" relationship
- In section "Loop Editor", within shortcode [wpv-items-found] ... [/wpv-items-found], display the "Education" accordion HTML codes + "Education" items
More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-items-found
Meta HTML wrapped in [wpv-items-found][/wpv-items-found] will be output if there are any posts | taxonomies | users returned by the View.
https://toolset.com/course-lesson/using-toolset-conditional-block/