Home › Forums › Calendar Products › Events Calendar PRO › Recurring Events Problem
- This topic has 9 replies, 4 voices, and was last updated 9 years, 2 months ago by
William.
-
AuthorPosts
-
January 8, 2017 at 3:27 pm #1214910
William
ParticipantThe Events Calendar pro version is also giving me a hard time with the recurring events. I thought it would be good to have since we do have recurring events and I sometimes forget to go change the date. However, I am having two issues that I don’t like.
1. If I have that event on the home page setup as a recurring event it will post more than one of that event depending on the dates.
http://www.newportdunes.com2. Less of an issue, it creates multiple events in the events page (backend) and calendar list on the website. Only an issue because their might be so many that the other events get lost in the crowd. Mostly an issue with the weekly specials, Since there are four of them that happen every week so it gets to be a lot.
January 9, 2017 at 4:07 pm #1215421Hunter
ModeratorHey William 🙂
What a small world it is! I grew up visiting Southern California and we’d stay at Newport Dunes in our R.V. for a week or two! What a great part of the country it is. Now down to business.
1. If I have that event on the home page setup as a recurring event it will post more than one of that event depending on the dates.
I imagine you’re using a shortcode to display the list of events on your homepage. It also appears you’ve chosen the Photo view. We have included an option under Events > Settings to display the first recurrence only, but it only works on list view.

Please try adding the following snippet to the bottom of your theme’s functions.php. This should display the first recurrence in Photo view. Please let me know how it works out. To submit feature requests, visit our UserVoice Feature Ideas.
/* Tribe, remove child recurring events from photo view */
function tribe_set_default_date ( $query ) {
if ( tribe_is_photo() ) {
$query->set( 'post_parent', '0' );
}
}
add_action( 'pre_get_posts', 'tribe_set_default_date', 15 );2. Less of an issue, it creates multiple events in the events page (backend) and calendar list on the website. Only an issue because their might be so many that the other events get lost in the crowd. Mostly an issue with the weekly specials, Since there are four of them that happen every week so it gets to be a lot.
We are aware of some improvements that can be made in the WordPress Admin Events dashboard, so I added this forum thread to the feature report for the developers to review while preparing to make improvements. I don’t have a temporary workaround for you in the mean time, but please stay tuned to our Release Notes and the plugin changelogs for more information.
If you have any more recommendations, the best venue to submit requests is our UserVoice Feature Ideas page. Thanks again and let me know if you’ve got any additional questions or comments. Cheers!
January 9, 2017 at 11:29 pm #1215652William
ParticipantSmall world, indeed, Hunter. Depending on how long it’s been since you were last here at the Dunes, you might find things have changed.
I tried placing the code into the functions.php page. But everywhere I put it crashed the site. Obviously, I’m doing something wrong.
Could you indulge me in looking at the attached copy of the functions code and give me an idea of where I’m messing up?
Thanks for your help.
Bill
January 10, 2017 at 7:09 pm #1216273Hunter
ModeratorHey Bill,
The last time I stayed at the Dunes was about 10 years ago, though I’ve driven by within the last couple years. I hope the change mentioned in this case is a good thing! I’m now in the Phoenix area so if you’re ever in my neck of the woods, look me up and we can grab some coffee.
The attached copy of your theme’s functions.php file didn’t come through, so I added it to the bottom of the default WordPress Twenty Seventeen’s functions.php file and shared it here.
If that doesn’t work, try resending your functions.php file and I’d be happy to take a look. Thanks for the update and hopefully we can get this going in no time. Cheers!
January 10, 2017 at 8:54 pm #1216339William
ParticipantHere is a still of from a video of holiday lights on the lagoon at the RV park, Hunter. Let’s see if that and the .zip file of the functions pages get through. Apparently the .rtf file is a no-no for this system.
The template was customized to beat the band by the company that created the site, so that may have something to do with the crashing when I insert the code. If you see anything odd, let me know.
If I get out to your neck of the woods, it will probably be Winter. Best time to visit Phoenix.
Bill
January 11, 2017 at 7:14 pm #1217120Hunter
ModeratorHey Bill,
Thank you for sharing the photo with me! Looks like a great time and whoever was in charge did an amazing job! I’ve attached a revised copy of the functions.php file you shared with me. At the bottom, it includes the code which should hide recurring events in photo view. Please give it a shot and let me know if it works out.
Click HERE to download file
Cheers!
January 30, 2017 at 11:25 am #1226345William
ParticipantGuess I need to revisit this issue, Hunter.
You had given me the code to place in the WordPress site functions page to allow the events in the home page to display a new recurring event after the first one timed out.
Actually, the person who is dealing with posting events sent me this email just today. Maybe this will help clarify.
Hi Bill,
Sorry it took me so long to get back to you on this. I thought it was
working because I added a recurring event to the home page and only one
was showing up. However now that I took an event off that happened prior to
the first date of the recurring event and replaced it with an event that
occurs after the second recurring event it starting showing two of the
same event on the home page instead of just the next date and then the new
event I wanted to post. Hopefully this is not too confusing. :/ (In other
words, it did not work)Thanks,
HeleneSo, the fix apparently didn’t have the desired effect. Do you have any other suggestions?
I’ll attach the functions code again to refresh memory. the site is newport dunes.com.
Thanks again for your indulgence.
Bill
January 30, 2017 at 4:45 pm #1226546Hunter
ModeratorHello again, Bill 🙂
Please try adding the following snippet to your theme’s functions.php file file. You’ll most likely need to remove the opening <?php tag, essentially pasting the following code at the bottom of the file:
/*
* The Events Calendar snippet
* Show only first instance of a recurring event in photo view shortcode
* Gist: https://gist.github.com/niconerd/e8efdd5a0a8d621e6b0ebeb699ef7413
*/
function tribe_hide_recurring_instances ( $query ) {
$query->set('post_parent', 0);
}function tribe_photo_shortcode_hijack_query ( ) {
add_action( 'pre_get_posts', 'tribe_hide_recurring_instances' );
}add_action( 'tribe_events_pro_tribe_events_shortcode_prepare_photo', 'tribe_photo_shortcode_hijack_query' );
I tested it on my local site and it hides all instances besides the first in a recurring series when using a shortcode to display Photo view. Let me know how it works out for you and take care!
February 21, 2017 at 8:35 am #1243074Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Recurring Events Problem’ is closed to new replies.
