Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

I followed the MakeUseOf tutorial ("https://www.makeuseof.com/tag/events-listing-custom-post-types-wordpress/") 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)?

MAKEUSEOF VIDEO OF THE DAY
SCROLL TO CONTINUE WITH CONTENT

Thanks for your help.

James Bruce
2012-03-07 09:24:00
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:http://pastebin.com/sj1LU2LM