Looping ACF Repeater field with posts and filtering by publish status

Hello,

I have an ACF custom post type called “Series,” and one of the fields is a repeater field that accepts “post objects.” I am consuming them on a custom post type page successfully, but I’m running into an issue with some posts in the repeater that are “scheduled” and not “published” yet. I can hide them using conditionals easily enough, but when a scheduled post is added, it affects my looper item count. Is there a way to filter my provider so as not to receive unpublished posts? I’m currently providing via the Dynamic Content provider type with {{dc:acf:post_field field="posts"}}. Does that make sense?


Screenshot 2023-10-18 at 3.41.55 PM

Hello @bobbybosler,

Thanks for writing in!

Please keep in mind that the Looper Provider will always return whatever is in the repeater. You will have to add a condition in your Looper Consumer that it will only show posts that are published using the DateTime condition.

In the demo above, I am using {{dc:post:publish_date}} BEFORE {{dc:global:date}}

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.