I don’t believe the acf_relationship
loop is able to accept query parameters like other loop types can, which means that you can’t just port over query parameters from the post
loop, unfortunately. I’m pretty sure the idea is that that loop type allows you to loop through data exactly as it’s entered into ACF.
If you just wanted to filter the results, you could have some conditional logic within your loop to accomplish that, but that wouldn’t allow your sorting to work.
You know what might work. You could use your acf_relationship
loop to create an array of post IDs. Then you could either save that as a variable or pass that directly to the value of the id
parameter in a post loop. Then instead of dealing with a acf_relationship
loop that doesn’t accept those query parameters, you’d be working with a regular post loop (filtered to only the posts in your ACF relationship field) so you could use all those query parameters. Let me know if that works out for you!