background preloader

Custom fields

Facebook Twitter

How-to: Custom Post Types for Events (Wordpress) Chances are you found this page looking for a tutorial on how to create Events with Custom Post Types within WordPress.

How-to: Custom Post Types for Events (Wordpress)

I will outline the entire process I’ve used for one of my themes that I’m re-coding (in order to make use of this great feature). You can also download the entire custom post type file that includes the code mentioned here. This is the visual output as is in testing today (please see the second tutorial for the code on outputting the design): Custom Fields 101: Tips, Tricks, and Hacks. How-to: Custom Post Types for Events Pt. 2. Now that we’ve handled the entire registration and back-end functionality (see Pt. 1) of our events custom post type, it’s time to move on to our design output (download the file for this tutorial here)!

How-to: Custom Post Types for Events Pt. 2

There’s no point in having fancy custom post types if you can’t display them properly. As you may remember, the entire reason for me requiring this functionality is for my Pub Theme (Pubforce), so I need to give my clients some flexibility with regards to its use. As you can see from the screenshot below, I have the following designs: 1) Featured (Shown with Big Thumbnail), 2) Full Listing (which groups by day) and 3) Widget Listing (again, grouping by day). I don’t want to hinder my end-users in any way so I’ve chosen to use shortcodes to let them decide where and how they want to deploy events within the main area, so let’s get right to that! My tutorial below will revolve around design #2 above.