Just incase anyone else was interested, I thought I would share where I got to.
The problem wasn’t with the query_posts as such, although I can still only get it to work with the switch to blog low down just before the query.
The problem was that the function wasn’t getting called in the first place. I had thought that changing the add_actions at the top of the file so that any wp ajax action going to the acf query post went to my query post function, it would work.
What I have actually ended up doing is writing some js in my plugin which watches the wp ajax call and if it is from one of my fields, it redirects it to my query post function.
I can’t imagine anyone would want to replicate this but if someone does I would be happy to share. I haven’t quite worked out how to pull the list of post types in yet though.
I think it is great you answer these questions in the first place and I am a big fan of ACF and all the things yo’ve managed to do with it!
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!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 21, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.