list of events with monthly pagination and custom taxonomy
-
We are building a site for a theater. We have spectacles (custom post type). With another great plugin (CPT-onomies )we are using the event custom post type produced by Events-Manager as a taxonomy for our spectacles.
This means that when we create a spectacle we can assign to it, exactly as you would do with tags to posts, some events (we have created previously one event for every representation of a spectacle).
We are able to list spectacles and retrieves the events attached to it (https://www.theatredelusine.ch/wp/reservations/)
We are able to list events and retrieve spectacle and associated data like in our home page – https://www.theatredelusine.ch/wp/ (the first block displays a list of 5 events with associated spectacle data thanks to this code: https://snippi.com/s/qvx6l0o)
In most of the site we are fine then ! But we have a page in which we want to display a calendar, in a fact a list of the events of a month, with the ajax monthly navigation provided with the plugin. We managed (thanks to David Churchill https://pastebin.com/TLqDER89), to do this, but the problem is that for each event of that list, we want to retrieve the title of the spectacle linked to that event and a few other things that are attached to the spectacle, a bit like on the reservation page.
But we were unable to mix our code into calendar-full.php so that our list is a bit more rich than just the title of an event !
Any idea how to do this ?
We are currently trying to see when an event id appears in the list of events linked to a spectacle and it works. But the thing is then that when you change month with the ajax navigation we loose our functions… and the check we do… see https://www.theatredelusine.ch/wp/evenements
Another little pbl is how to get rid of the grouped by day thing of the list of David Churchill that we don’t need ?? – just a plain list of events by month would be fine !
As you can see we are no great coders but we learn… ??Any help welcome…
I was thinking of linking post category to event so that we could try to assign the same unique category of a spectacle to its events but I don’t know if that’s the correct way to do it.
Another option I tried without much success was to create an monthly archive page for events…
I don’t understand why we could not mix the code we use on the homepage into this calendar-full.php…
Thank you !
- The topic ‘list of events with monthly pagination and custom taxonomy’ is closed to new replies.