Solution:
I was creating the conditions inside the candidatura loop that is inside the acao loop and the acf fields are inside the candidatura so the conditions were not checking because it didn’t had access to the values of the acf fields. I have moved the container outside the acao loop and the conditions now are working.
Structure that works:
###############################################################
I have two CPT, one is Candidatura and the other Acao. The are related with a acf relationship field.
In my candidatura archive template I’m querying the candidatura (on the element cand-wrapper) and inside I’m querying the acao with the acf relationship field (on the element Ação). Everything is working good here:
Structure:
Layout:
I want to create conditions to show/hide the element botoes wrapper based on two acf subfields called {acf_campos_de_estado_da_candidatura_estado_da_candidatura} and {acf_campos_de_estado_da_candidatura_estado_da_candidatura_interna}.
My first condition is to show the buttons container if the {acf_campos_de_estado_da_candidatura_estado_da_candidatura} == ‘Submetida’
So i’ve created the following condition:
but it doesn’t work, the container simply doesn’t show.
Also I’ve tried to create the condition acf field is not empty and the container keeps not showing. And i know the acf field is not empty because it’s showing the values on the text field, inside the loop.
Is it because its a acf field inside a group field?
group field is: campos_de_estado_da_candidatura
field inside is: estado_da_candidatura
What I’m doing wring here??? I can’t figure it out.
I don’t want to go with code option because I’m not that good yet and there is a bunch of other conditions that i want to create and would love to use the bricks features for this.
Looking forward for you help.