Home › Forums › Backend Issues (wp-admin) › Using acf/fields/relationship/result on ACF Block › Reply To: Using acf/fields/relationship/result on ACF Block
This should have nothing to do with blocks. Your field name is likely changing because it is cloned and may sometimes be a sub field and sometimes not.
I would use the generic filter hook acf/fields/post_object/result
(no key or name). and then check the field name in my filter something like
if (strpos($field['name'], 'download_post_object') === false) {
return;
}
You may also be able to do this by using the field key variant, but depending on how the field is cloned the field key might also be changed when ACF runs these filters, I’m not sure.
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.