Similar Events shown in a series + how to display all datees of an series

Home Forums Calendar Products Events Calendar PRO Similar Events shown in a series + how to display all datees of an series

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1232013
    Tom Jaeger
    Participant

    Hi folks
    I’m new to Event Calendar Pro and i have two questions:

    1) I would like to use the series event to display a course with 10 units. So one Course is from April 5 2 times a week 5 weeks long.
    Problem now: On the event detail site all other units are shown as unique events in “similar events”. How i can remove that?

    2) i would like to display all Dates of an course on the detail-page. Not only the first. Is that possible? Simmilar to the question before i would like to handle a Course as an single event. Not 10 single events.

    Tom

    #1233146
    Barry
    Member

    Hi Tom,

    Thanks for getting in touch (and apologies for the delay in responding).

    To help us deliver fair and fast service to everyone we do try hard to stick to one problem/question per forum topic. With that in mind, let’s kick things off in this topic with your first question—and if you could please create a new topic for the second question (regarding the display of all course dates in a series) a team member will be happy to try and steer you in the right direction.

    Please do also note that, while we try hard to help whatever the issue, for certain more technical customizations that the degree of support we can offer tends to be limited.

    I’ll review your first question (removing events from the same series from the related events section of the single events page) and get back to you as soon as I can 🙂

    Thanks for your patience in the meantime!

    #1233152
    Barry
    Member

    Hi again Tom!

    Would this snippet help/get you closer to your objectives?

    function related_events__ignore_same_series( array $args ) {
    	// Safety check: do not interfere if PRO is not active
    	if ( ! class_exists( 'Tribe__Events__Pro__Main' ) ) {
    		return $args;
    	}
    
    	$event_id = Tribe__Events__Main::postIdHelper();
    
    	// Do not interfere if this is not a recurring event
    	if ( ! tribe_is_recurring_event( $event_id ) ) {
    		return $args;
    	}
    
    	$parent_id = wp_get_post_parent_id( $event_id );
    
    	// Ignore events from the same series
    	$args['post_parent__not_in'] = ( 0 === $parent_id )
    		? array( $event_id )
    		: array( $parent_id );
    
    	return $args;
    }
    
    add_filter( 'tribe_related_posts_args', 'related_events__ignore_same_series' );

    You would need to add this snippet either to a custom plugin of your own, or else to your theme’s functions.php file (preferably a child theme, to help avoid the risk of losing customizations like this upon update).

    Does that help here?

    #1249474
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Similar Events shown in a series + how to display all datees of an series’ is closed to new replies.