I’m a bit stumped.
I have a CPT of event that has another CPT of sponsors connected to it
On the homepage, I want to show a list of events, and for each event I want to show the sponsors, but first the ones of category “platinum”, then “gold” etc.
So I have multiple nested queries, one for each category ( I know there’s probably better ways to do this, but I’m not really a programmer). The problem is only the first one works. The following ones always return
Warning: Could not find direction(s). in /home/…/wp-content/plugins/posts-to-posts/core/query-post.php on line 16
regardless of which one is first, only the first one works. I’ve tried explicitly setting ‘connected_direction’ => ‘any’. this removes the error, but still shows nothing.
This is my ugly code:
Any clues will be appreciated
- The topic ‘Two nested loops- only one works’ is closed to new replies.