You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an event (58059) connected to a single video (61427). I am attempting to retrieve all videos connected to the event 58059. I'm using this code to test the query:
The above produces a list of events, but changing 'connected_direction' to 'to' produces no results, which makes me think there is something wrong with one side of the connection.
Edit: Worth nothing is that when I hook pre_get_posts and dump the query there are three queries performed; the first with post_type set to all, the second set to 'video' and the third to 'event'. That second query includes 'post__in' with 58059 as the value, which clearly isn't going to work. You can see that on pastebin.
The text was updated successfully, but these errors were encountered:
philipjohn
changed the title
Query vars failing to find return posts
Query vars failing to find connected posts
May 2, 2014
In attempting a custom Query using P2P's query vars I'm struggling to get anything back that makes sense.
My end goal is a list of videos that are connected to a single event.
My connection:
I have an event (58059) connected to a single video (61427). I am attempting to retrieve all videos connected to the event 58059. I'm using this code to test the query:
This results in
No posts.
which is unexpected. I expect a list with one item - the ID of my single linked video 61427.I've tried these variations for query args;
...and changing connected_direction to "to" and "any" produces the same result.
The above produces a list of events, but changing 'connected_direction' to 'to' produces no results, which makes me think there is something wrong with one side of the connection.
Edit: Worth nothing is that when I hook pre_get_posts and dump the query there are three queries performed; the first with post_type set to all, the second set to 'video' and the third to 'event'. That second query includes 'post__in' with 58059 as the value, which clearly isn't going to work. You can see that on pastebin.
The text was updated successfully, but these errors were encountered: