Home › Forums › Calendar Products › Events Calendar PRO › Past Events via Posts 2 Post plugin
- This topic has 9 replies, 3 voices, and was last updated 10 years, 6 months ago by
Support Droid.
-
AuthorPosts
-
September 28, 2015 at 4:11 am #1009119
Robert
ParticipantHi there,
I’m working on a site where my events would need subpages. So I thought I’m going to register a CPT than I’ll connect it through Posts 2 Post plugin. But for some reason its only shows the future Events for some reason. I’ve read through the forum and in the latest thread (https://theeventscalendar.com/support/forums/topic/past-events-cant-be-found-via-posts-2-posts/) nothing happened about this issue. Could you guys please update me if there is any solution?
Thanks,
Robert
September 28, 2015 at 9:57 am #1009288Josh
ParticipantHey Robert,
Thanks for reaching out to us!
It looks like the resolution from the previous thread involved reaching out to the P2P creators. Based on Brian’s research it looks like the plugin should be pulling all the events but doesn’t look like there is anything we can do on our end to make them more compatible in this area.
Let me know if this helps.
Thanks!
September 30, 2015 at 8:34 am #1010061Robert
ParticipantAre you sure you not crashing something with the query?
Just because i can see some strange behavior:
$args = array ( "exclude" => array($promoted_event), "posts_per_page" => 4, "post_type" => "tribe_events", "orderby" => "event_date", "order" => "ASC" );$events = get_posts( $args );
This gives me back the good result with 4 events past and future promoted excluded.$events = tribe_get_events( $args );
This gives me back bad result because the excluded event is there.$events = new WP_Query( $args );
This gives me back only the future events including the excluded event.Or if I add
eventDisplay => 'custom'to the query args it gives back the same result liketribe_get_events( $args );So there should be something wrong no?
October 1, 2015 at 8:20 am #1010484Robert
ParticipantAnyone?
October 1, 2015 at 8:23 am #1010489Josh
ParticipantHey Robert,
Thanks for following up on this one.
I’ll do some further research and reach out to our team on this one and get back to you shortly.
Thanks!
October 4, 2015 at 8:20 pm #1011306Josh
ParticipantHey Robert,
I’ve done some further review on this one and I’m not sure there is a straightforward way to get the P2P relationship field to show all the events at this time. Would it be possible to switch the relationship format? Instead of trying to search the events within your post to make the connection, why not try to search the posts within your events?
Let me know if this helps.
Thanks!
October 6, 2015 at 2:25 am #1011798Robert
ParticipantThis is not only a P2P problem. The
tribe_get_events(array("exclude" => array($promoted_event)))should also work. But for some reason its not excluding the given event. So i guess there should be some problem in the plugin custom query modifications.October 7, 2015 at 3:10 am #1012170Robert
ParticipantHm,
post__not_inworks fine. But it still requires"eventDisplay" => "custom",argument in the query to work like a normal WP_Query. So I keep up that not P2P plugin uses wordpress functions in a bad way, but you should change the logic with this “eventDisplay” argument. It should be normal WP_Query without this argument, and you should useeventDisplay => "tribe"to make your custom queries working.Thanks!
October 8, 2015 at 8:25 am #1012742Josh
ParticipantHey Robert,
Thanks for following up here and I’m glad you were able to find a resolution that works for you here.
I can understand the argument here, my only counter would be that 90% of queries of events don’t require the past events and would actually be counter to what would be a desired output.
Thanks!
October 23, 2015 at 7:05 am #1017248Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Past Events via Posts 2 Post plugin’ is closed to new replies.
