Cutom Post types and Organizers and Venues

Home Forums Calendar Products Events Calendar PRO Cutom Post types and Organizers and Venues

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #987710
    Katie
    Participant

    Is there anyway to match up Organizers and Venues with custom post types? Our site already has detailed profiles and location info which we’d really like to be able to match up with the calendar info. (For example: have upcoming events show up on the profile or location page like they do for Organizers and Venues pages, etc.)

    #987856
    George
    Participant

    Hey Katie,

    Rewiring The Events Calendar to use your custom post types is possible, but quite extensive in terms of making sure all the functionality still works and is a customization we do not offer support for here in the forums.

    I’m sorry to disappoint! There are three solutions I can think of here:

    1. Proceed with making code edits directly, so that The Events Calendar’s functionality for Venues and Organizers is mapped to your custom post types. As mentioned, we cannot help with bringing this customization fully to fruition, but the gist of it would involve heading to src/Tribe/Main.php in your Events Calendar plugin files, and changing the slugs used for the VENUE_POST_TYPE and ORGANIZER_POST_TYPE constants. You should see them like this → https://cloudup.com/c8JT5EhbLN1

    So, instead of ‘tribe_venue’ for Venues, you could replace it with your custom location type’s slug, and so on for Organizer.

    This is just the first thing you’d have to do, of course, and many other features of The Events Calendar may take some extensive coding to map to the new post types.

    2. Another option for using this post type data is to export the data from these post types, and import it into the default Organizer and Venue types. This might take some playing around to achieve, so so if you have a test site or something this is best suited for that so that you get the process down first.

    But basically, if you find a good CSV export plugin out there for WordPress (there are many free ones), you should be able to export your custom post types into nice CSV files, with all their Meta Data and everything. Then, head to Events > Import, and use The Events Calendar’s built-in CSV Import tool. Instead of importing “Events”, however, you’d just select the Organizer or Venue post type first where appropriate. This might help. If it goes smoothly, you’d be left with a set of Venues and Organizers with all your original data.

    3. If the data in your custom post types is too complex for an import like I mentioned above, and that fails, then the only other thing I can think of would just be to write custom code on your custom-post-type pages. You write that this is basically what you want to achieve: “For example: have upcoming events show up on the profile or location page like they do for Organizers and Venues pages, etc.” – if you find the code within The Events Calendar itself that generates such lists on Venue and Organizer pages, you can basically just copy and paste it all and add it to the post type pages of your own post types, reworking it where necessary to load your own post types and such.

    I’m sorry for the length of this post – I just wanted to cover some ideas for what you can do in your current situation. I hope at least some of the information here is helpful.

    Cheers,
    George

    #988216
    Katie
    Participant

    Thanks for all the options. None are ideal, but we can probably make one work. I’m thinking the third option will probably be what I have to do. The second option – importing the data – might be the best long term but I’d need to extend the Organizer and Venue options – that is, include images and some additional info like bio’s and specialties for the organizers. Is that something that’s possible/practical or would it be better to try to add Events code to the custom post types instead of trying to add to the available options?

    #988604
    George
    Participant

    but I’d need to extend the Organizer and Venue options – that is, include images and some additional info like bio’s and specialties for the organizers. Is that something that’s possible/practical or would it be better to try to add Events code to the custom post types instead of trying to add to the available options?

    Your question is somewhat challenging to answer since I don’t quite know what your technical abilities are, or your budget for hiring the technical abilities, or what your project requirements are, etc…

    However, yes, adding such information is possible, and is practical if you know what you’re doing. Fortunately, adding Meta information to post types in WordPress is quite simple. There’s plenty to read on this topic online if you’re curious to learn more, but the gist of things is that:

    • In WordPress, you can add custom post meta to Posts, Pages, Attachments, or any Post Type.
    • Venues and Organizers are straightforward, extendible post types.
    • Thus, with some custom code, you can add custom post meta to Venues and Organizers to store any extra data you’d like.
    • WordPress’ system for this is robust enough that you don’t even have to edit The Events Calendar plugin code, which is not recommended to do anyways. You can literally write your own plugin separate from The Events Calendar and its add-ons that just adds Post Meta to Venues and Organizers, and handles their saving/displaying/etc.

    Then, with the principles of our Themer’s Guide, you can customize the display of Venues and Organizers in a safe way by just adding custom calendar views to your theme. Here’s our Themer’s Guide → https://theeventscalendar.com/knowledgebase/themers-guide/

    Like I mentioned, there are many resources online for how to use, add, customize, store, share, etc. Post Meta. Here’s a good basic overview which links to many other more detailed posts, it’s a good place to start → https://codex.wordpress.org/Custom_Fields

    So, with all that being said, what’s the right thing for you?

    Well, I’m not sure. I happen to be a developer for a living, so for me personally, I would build out the custom meta as I describe above to save time in the long run and leave the core Events Calendar plugin code untouched, which would make updating the plugin in the future painless.

    But if you think that would create more headaches for you than alternatives, then the other options or good too.

    I hope this information is somewhat helpful – I know it’s a bit vague, but hopefully you get some of the pros and cons of the solutions here and it helps you make a decision from there.

    One last note – if you’re interested in hiring someone for this project, you can email us at [email protected] for a list of Freelance developers that we frequently recommend to folks.

    Cheers!
    George

    #993382
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Cutom Post types and Organizers and Venues’ is closed to new replies.