Event with Same Title Appear only once
I am using Events Calendar PRO – I have some events that have the same title but cannot be shown once using the tribeHideRecurrence tag because they could not be entered as a recurring event because for example they occur on the same date but at different times say a matinee and then an evening show. Is there a way to have the list only show the performance once in the list if the event title is the same?
Hi Beth and thanks for getting in touch. Welcome back to the forums. 🙂
That’s a great question. As you might imagine, tribeHideRecurrence only has an impact if the events are in the same recurring series. That means two events can have the same title and still display since they are separate posts in seaprate series.
One idea might be to create a category called Hidden and remove that category from your calendar display. That would allow you to set the visibility on specific events that you would prefer to hide.
Would that work for you? Please let me know.
Is there any query parameter that can be added to the functions.php file. The problem with the category is that multiple people will be entering events from their organizations and I can’t rely on them to ensure that they use the hidden category. If I can programmatically control it it would be much better.
That’s a good question. I would imagine it would be possible, but with custom development that is unfortunately outside the scope of support we provide here in the forums. I think either of the recommendations I suggested earlier will work, but customizing beyond that is something I’ll leave to you.
Please feel free to follow-up with specific questions about the customization as you get started and we’d be happy to try to answer.
Absolutely! In fact, here is a nice example where pre_get_posts was used to randomize events in the main loop of a site. The same idea could be applied to the events loop using conditional wrappers for events loops.
I’ll go ahead and close this thread since it seems we’ve covered the base question, but do please feel free to start a new thread if you have any other questions here and we’d be happy to help. 🙂