Home › Forums › Calendar Products › Events Calendar PRO › Using additional post types
- This topic has 10 replies, 2 voices, and was last updated 11 years, 8 months ago by Jonah.
-
AuthorPosts
-
September 6, 2012 at 1:05 pm #24659David LuyendykParticipant
Hi,
As long as the date format is what ECP needs, can we inject other post types into the calendar? Ideally, I’d be using this to display birthday information, anniversary dates, etc based off of information from another post type. The ability to pull-in data without duplicating would be great. Thanks!September 6, 2012 at 3:06 pm #24665JonahParticipantHi yellowhousedesign,
Couldn’t you just convert the other post types instead?
– Jonah
September 7, 2012 at 5:23 am #24675David LuyendykParticipantHi,
No – I don’t believe that will be possible. We’re going to be feeding in this information throughout the rest of the website. We’re creating an ‘Employee’ post type, which will hold a butt-load of information about them (and will be regularly imported weekly through a CSV — using TurboCSV). We’re using Advanced Custom Fields to handle all of the extra meta data needed. There will be a searchable/sortable directory, business card ordering, etc — and we’ll be feeding those other areas with this information. We’ll also be using this date to create anniversary and birthday dates on the calendar. I believe this could be done in theory with pre_get_posts(), but was looking for some guidance on how to get them in there. Thanks.September 7, 2012 at 10:12 am #24690JonahParticipantHi yellowhousedesign,
Incorporating other post types into the calendar is going to require a fair amount of query wrangling and is not something we can assist you with. You’ll need to work it out on your own or hire someone to help you. Good luck!
Regards,
– JonahSeptember 11, 2012 at 1:40 pm #24832David LuyendykParticipanthttp://snippi.com/s/3jqxqca Seems to at least get another post type into the list, but it alters the layout (goes from the month view to a standard post listing view). Any further hints, or still no-go 🙂
September 11, 2012 at 1:43 pm #24838JonahParticipantHey yellowhousedesign,
That looks close. You can try adding some additional conditional wrappers to the code to get it to affect the different views you need to. This may help: https://gist.github.com/2415009
Cheers,
– JonahSeptember 11, 2012 at 1:46 pm #24842David LuyendykParticipantAppreciate it!
September 12, 2012 at 6:14 am #24878David LuyendykParticipantHi,
Thanks again for the previous info – definitely helping me along. I know as you mentioned this is a little outside of the normal support requests, but I’m running into the following:ice: Trying to get property of non-object in /wordpress/wp-content/plugins/the-events-calendar/lib/the-events-calendar.class.php on line 2494
Notice: Trying to get property of non-object in /wp-content/plugins/the-events-calendar/lib/the-events-calendar.class.php on line 2505
and looking at those lines, http://pastebin.com/rXdEagyw they are both performing checks to make sure that the current post is indeed the ‘tribe_events’ post type. Is there any way to filter into that? I’ve brought over (and can replicate) the other types of meta fields onto my custom post type, but this check seems to be one obstacle in my way. Thanks again!
September 12, 2012 at 8:09 am #24909JonahParticipantHey yellowhousedesign,
Can I take a look at your latest code that’s generating this error?
Thanks,
JonahSeptember 12, 2012 at 9:05 am #24924David LuyendykParticipantHi Jonah,
Really appreciate the response. The latest code is http://pastebin.com/WDa45yDEWhat I’ve also done is enter in the same postmeta fields that is used for EC, like:
_EventRecurrence
_EventAllDay (which every event will be – used for birthdays for example)
_EventEndDate
_EventStartDate
_EventDurationI’ve noticed that while posts do display on the calendar for the date noted, the actual “pop-up” does not work, generated from /views/table.php, which seems to call-in tribe_get_events, which may be the part I’m missing here — as it does have return apply_filters(‘tribe_get_events’, $tribe_ecp->getEvents( $args )); which may be able to be plugged into. Thanks!
September 12, 2012 at 1:25 pm #24940JonahParticipantHi yellowhousedesign,
Sorry man but I’ve already spent more time that I can on threads. It sounds like you are real close but you’re on your own from here on out. Good luck!
– Jonah
-
AuthorPosts
- The topic ‘Using additional post types’ is closed to new replies.