Home › Forums › Calendar Products › Events Calendar PRO › Recurring Events Problem
- This topic has 6 replies, 2 voices, and was last updated 13 years, 6 months ago by
Barry.
-
AuthorPosts
-
October 8, 2012 at 11:21 am #26258
Stefhan
ParticipantHi, I’ve run into a problem with Recurring Events I’m hoping you can help with..
I’ve implemented Barry’s fix for only showing one instance of each recurring event on the front end, but still populating the calendar. The solution was here:customize output of recurring events: list title/desc once, all dates under that
This worked fine whilst testing but once I added all the client’s info I ran into two problems:
1. The list template is only showing 8 entries per page, rather than the 15 as specified in settings
2. The template is showing only one instance of each recurring event on the first page, but then repeats the same ones (with new ones added) on pages 2 and 3. This is going to be very confusing for the visitor and effectively hides later events.Can you offer any advice on how to fix it please?
Ta
October 8, 2012 at 2:15 pm #26290Barry
MemberHi Stefhan, sorry that didn’t work for you in this case.
The list template is only showing 8 entries per page, rather than the 15 as specified in settings
It should still result in the correct number of events being displayed, albeit some are nested under “parent events”. So if Event A is displayed with future recurring instances P, Q and R listed beside it then that counts as 4 posts.
The template is showing only one instance of each recurring event on the first page, but then repeats the same ones (with new ones added) on pages 2 and 3. This is going to be very confusing for the visitor and effectively hides later events.
Not 100% sure what you mean? If you could elaborate, provide screenshots and/or URLs that could be helpful here.
October 8, 2012 at 11:53 pm #26320Stefhan
ParticipantThanks Barry
That makes sense about the first bit – not showing 15 entries per page.
With the second problem, I’ll send you the URL via email as it’s in development at the moment, but I think it’s something to do with pagination. The website includes a series of classes, most are weekly with a few one day classes. I’d like to have one entry per class irrespective of whether the class is a one day event or a weekly event for a term (so I’m just using ECP for the calendar really)
I’ve implemented your function and list template from the other thread and this works well on the first page of the paginated ‘classes’ section. However on page 2 some of the classes from page 1 are repeated, but not all. The same happens over the rest of the pagination. It seems to be that when you go onto page 2 the code doesn’t remember that it’s shown particular classes before. And it seems date dependent – the class which is furthest in the future is listed last.
I’ll send you the URL so you can see for yourself.
Any help you can offer would be much appreciated.
Many thanks again
October 9, 2012 at 6:06 am #26329Barry
MemberSure I’ll look out for your email.
October 9, 2012 at 7:16 am #26334Barry
MemberI think perhaps you are misunderstanding what my code does, it’s not actually doing anything wrong here (so far as I can see).
Let’s say you have set WordPress to display 5 posts per page and you typically have 5 events each week.
The first page of results is only going to cover one week. If one of those events happens to recur on a weekly basis, then under those circumstances the recurring instances will not be caught by my code and they will inevitably be repeated on pages 2, 3 … of results.
If you need different behaviour I’m afraid you would need to develop a different solution here.
October 9, 2012 at 8:44 am #26352Stefhan
ParticipantThanks Barry. Do you have any ideas how I could accomplish what I’m after? I only want each event to show up once in the list, so if there are 10 events you can see them all on one list page, irrespective of whether there the event runs over 10 sessions or just one.
Any help would be much appreciated.
Thanks
October 9, 2012 at 9:02 am #26355Barry
MemberWell, one approach I can think of is to modify the main events query so that recurring events are not returned. Second, you would check each event that is returned to see if it is recurring and, if it is, run a new query to get a list of all the recurring instances.
There are quite possibly several ways to do this, that’s just one (very broad) approach.
Unfortunately we just can’t realistically allocate the time to guide you through this one.
-
AuthorPosts
- The topic ‘Recurring Events Problem’ is closed to new replies.
