Using additional post types

Home Forums Calendar Products Events Calendar PRO Using additional post types

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #24659
    David Luyendyk
    Participant

    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!

    #24665
    Jonah
    Participant

    Hi yellowhousedesign,

    Couldn’t you just convert the other post types instead?

    – Jonah

    #24675
    David Luyendyk
    Participant

    Hi,
    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.

    #24690
    Jonah
    Participant

    Hi 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,
    – Jonah

    #24832
    David Luyendyk
    Participant

    http://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 🙂

    #24838
    Jonah
    Participant

    Hey 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,
    – Jonah

    #24842
    David Luyendyk
    Participant

    Appreciate it!

    #24878
    David Luyendyk
    Participant

    Hi,
    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!

    #24909
    Jonah
    Participant

    Hey yellowhousedesign,

    Can I take a look at your latest code that’s generating this error?

    Thanks,
    Jonah

    #24924
    David Luyendyk
    Participant

    Hi Jonah,
    Really appreciate the response. The latest code is http://pastebin.com/WDa45yDE

    What 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
    _EventDuration

    I’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!

    #24940
    Jonah
    Participant

    Hi 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

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Using additional post types’ is closed to new replies.