I’m having this issue as well. I have my field set to only show media uploaded to the post, but on the frontend it’s showing all media items. This, for me, only happens when I’m making a new post on the frontend – always in the admin and when editing a post on the frontend it works as expected.
Knowing that it works when editing, I’ve been playing around with the attributes sent to
post_id. When I set it to
'new_post' like the guides say, it doesn’t work – however, when I set it to
false for new posts it seems to show the library correctly! This, however, then makes ACF send the post ID from the page displaying the form to
acf/load_value when it should be
false or blank to indicate it’s a new post. It also makes it impossible to save the new posts..so yeah.
Anyone figure out what going on here?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.