Home › Forums › ACF PRO › Error adding action to acf/load_field › Reply To: Error adding action to acf/load_field
Not sure if this will make any difference but you are using setup_postdata() but you are not calling wp_reset_postdata().
Second problem, these are filters and you must return the value of $field back to ACF, which you are not doing in either filter You should be using add_filter() rather than add_action().
Somehow, and I can’t pin it down exactly, but you are causing an infinite loop when both of these filters run at the same time. This could be due to the problems I already gave or could be from something else.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.