Home › Forums › General Issues › Completely Replace Relationship Query › Reply To: Completely Replace Relationship Query
No, that won’t work, ACF does not actually do anything on that hook and only provides it so that you can alter the query that’s going to be run anyway.
To replace the query completely you’d need to figure out how to remove the ajax actions that are called, and unfortunately, I don’t see any way to do that….
and then I find one.
So I’ve never really given this much thought, and I cannot tell you everything that is involved, this is just a vague idea of how it could be done.
wp_ajax_acf/fields/relationship/query
and wp_ajax_nopriv_acf/fields/relationship/query
https://codex.wordpress.org/Function_Reference/remove_all_filtersEDIT: making sure that you return the values for the relationship field exactly the way that ACF returns the values
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.