[fr] Prise de tête pour trouver un moyen d'utiliser WordPress pour afficher des événements (des billets spéciaux, mais pour lesquels on précise aussi une date de début et de fin d'événement). Il faudrait qu'on puisse afficher les "événements encore pas terminés" sur une page spéciale.
Deux plugins m'offrent des solutions partielles, mais je suis incapable de les transformer en solutions totales. Toute aide serait bienvenue.
Besides using WordPress as a blogging tool, a client of mine would like to use it to display a page of upcoming events. I’ve dug out a number of plugins which somewhat do the job, but getting things to work exactly as we want is proving to be a pain in the neck.
As I’ve been stuck on this for a few weeks now and still see no light, I’m offering this problem to the collective mind out there in hope that a bright solution pops up somewhere before we go live (which is… very soon — hear my desperate plea for help).
Here’s what we want
- events should be posts (this rules out Shrikee’s Events Plugin)
- events have a start date, and an end date — time is unnecessary (this rules out RS Event)
- events should show up in the normal flow of posts and on their own category page (we don’t want them on the home page, but I can exclude the category manually, so that’s a non-issue)
- we should be able to display upcoming events on a WordPress page (I’ll stick whatever code is needed in the template for that page) — “upcoming”, here, meaning events whose end date is not yet past.
Event Calendar seemed like a good candidate, although we didn’t really need the “calendar” itself. I hacked the layout of the event posts so they displayed OK. However, the main bit is missing. Event Calendar provides a way to list all the events “after today”, by calling
http://blog.address/?ec3_after=today for example. Unfortunately, this doesn’t work on our setup (probably something we did to the rather hacked theme. I’ve had a look at the source code but couldn’t really figure out what happened when that variable was passed, so was unable to reproduce anything ressembling it in a Page template.
Another problem is that this will not show events which have started yesterday but which are not yet over, if I’m not mistaken.
Last but not least, we have two event subcategories, so I’d have to create two (or even three) separate event pages — but I guess that if I manage to make one, filtering posts by category shouldn’t be too hard.
Another solution would be to use Posts Expire and Posts Begin as described in this forum post I stumbled upon yesterday. Again, these plugins provide a way to call “posts which have not yet expired” with a particular URL:
home/?orderby=post_end_date. Again, I haven’t manage to dig out the code and stick it in a Page template — trying to rewrite a pretty URL to that one is source of much hair-tearing upon this server I have very little control on, and I haven’t found a way to make it work.
The other problem I’d have to work around if using these plugins is that expired posts are not displayed in the blog anymore. I’m not sure what code in the plugin takes care of that, but it would have to be commented out.
So, I have two partial solutions here, but I’m stuck making progress on either. Do you have any ideas which could help me out — either to make one of my partial solutions a working one or to find a third one?
I’d really really appreciate help on this one. Thanks a lot.