ACF Relationship Query loop showing draft content - no way to filter by published status.
The field is working in all other respects, just no options in the “type > ACF Relationship” input to specify published only status.
Not sure if this is a bug or a feature request - but i as it currently is, it makes it problematic to use. I can’t see why you’d ever want to loop draft posts…
eg. also makes any other conditional display elements think there is post content when in fact they are draft status.
I can add a published status conditions on the loop element (as @timmse describes below) , but i want to hide a section when there is no content , not just the looped element.
Hi Pete,
If you think you have found a bug, please post your report with reproducible steps in the “bugs” category and not in “how to”
It seems as if the “Filter by post status” setting of the ACF relationship field is currently not supported, but you can use a “post status” condition on your loop item, which works fine as far as I can see.
I do already have a condition set up to hide the section if there is no ACF relationship content which works . - but not when there is a related draft post - just also treating Drafts as “Not Empty”
Hi @timmse , that doesn’t help with being able to add a condition to hide the section if there is no published content i’m afraid, only the looped item.
Now you can use {query_results_count:xxx} (replace xxx with the Bricks ID of the loop) in a condition on the section. If there are only draft posts, the results count will be 0, and the section won’t show.