How can I make a WordPress “Event List” that can handle multi-day events?

Jeremiah Cress March 7, 2012
Pinterest Stumbleupon Whatsapp

I followed the MakeUseOf tutorial (“// How To Make Your Own Events Listing Using Custom Post Types [Wordpress] How To Make Your Own Events Listing Using Custom Post Types [Wordpress] One of the advantages to using Wordpress is its sheer flexibility. Version 3 introduced the concept of Custom Post Types to extend the built-in functionality. Let’s take a look today at what you could do... Read More “) which described very clearly how to use the custom fields in wordpress to make a page dedicated to displaying events. It worked just fine and looks great, but will only show single day events. Is there a way to adjust the code so that I can input multiple custom fields for start and end dates to events (for week long or weekend long events for example)?

Thanks for your help.

  1. James Bruce
    March 7, 2012 at 9:24 am

    Hi Jeremiah, I guess I should answer this. You could create an extra custom field for end_date, and detect if thats present in the events page. If so, change the wording to be " "this event will be held from X to Y". Here's a quick adjustment of the event listing code, to be used instead where it says "add this code just after the_content" in the origianl tutorial. Try this: