The shortcodes needs to end in the reverse order that they started:
[loop]..[if]...[/if]..[/loop]
This will check the [if] condition for each post in the loop. From your description, I think this is what you want.
Just for example, another possibility is:
[if]..[loop]...[/loop]..[/if]
That will check the field for the current post, and display a loop if the condition is true.
it doesn´y work.
If I put the code:
<h5><span class="h-fina">EN</span> PORTADA</h5>
[loop type=reportaje]
[if field=sale_a_portada value=checked]
<h1>[link][field titulo_de_portada][/link]</h1>
[/loop]
it works, and the web is like I want, but f i put the code as you say, the wen doen´t show nothing.
I use the DMS2 the pagelines, and the code is in a text-box. I probed with a widget, and doesn´t wor either.
Sorry for my bad english…
I read your original message and found one more thing, that this is a true/false field. If you’re using Advanced Custom Fields, a true/false field has a value of 0 (false) or 1 (true).
You can check if the field is true by comparing it to 1.
[loop type=reportaje]
[if field=sale_a_portada value=1]
...
[/if]
[/loop]
The [if] shortcode needs a closing tag, same as the loop.
The loop shortcode also can check for field value, so the above can be shorter:
[loop type=reportaje field=sale_a_portada value=1]
...
[/loop]
Thanks! Now it works fine.