Hi,
I’m baffled and very confused with conditionals and how to hide an element if it’s empty
I’m trying to hide a cell in a grid element if the content of the ACF repeater has no entries
I have an CPT called Aircraft which contains the specifications for an aircraft i.e. Tech spec, performance and armaments that it can carry. The armaments areas has several sub-types (guns / missiles/ bombs and external stores ). Some of my aircraft for example cannot carry missiles so I want to hide that Grid cell if the ACF repeater is empty.
My acf setting up is as follows
- Group > Repeater > text item. i.e Armaments > Missiles > Missile name
I’m using the layout editor to create a master layout that my CPT will populate and it’s all working expect being able to hide the cell if there is no information present. My layout area is as follows
- Section > Grid Element > Cell > in the Cell I have a text element as a title and then a list element displaying the ACF repeater information as Dynamic content.
I’ve tried using the conditions and can either hide it totally or reveal it totally but can’t seem to work out how to hide it if it’s blank and so it if it’s got entries.
Can anyone help ?