In the WPDevDesign Facebook group, a user asks:
What I’m trying to accomplish is very simple: I made a repeater for team members. The block includes a text field for the bio but this should only show if there is content coming from dynamic data: repeater field => field => bio. The text field has a margin of 20px and underneath there is link-wrapper to the email. So if there is no content for the bio, the text field shouldn’t show up at all to avoid the extra margin spacing.
So my question is: how should I set the conditional to achieve this?
This tutorial for Oxygen provides the steps to output a Advanced Custom Fields’ Repeater-type of field’s sub field value only if that (or any other – if you want) sub field is populated.
In the Oxygen editor select your Repeater component and within that, your sub field (in this example, “Bio”).
Click on Condition Settings icon and then Set Conditions button.
Select Dynamic Data condition.
Click on Repeater Field under Post.
Select your sub field and click INSERT.
Select is_not_blank as the operator.
and that’s it!
Now the custom field will only get output on the frontend if the selected field has a value.
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.