Organizer Archive Page (similar to Venue Archive Page)

Home Forums Calendar Products Events Calendar PRO Organizer Archive Page (similar to Venue Archive Page)

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #29461
    Will
    Participant

    hello all!
    I saw a post a few seconds ago detailing adding a list of upcoming events on a single organizer page. Cool beans. However, by default, I’m not seeing an archive page for Organizer. Is this theoretically as easy as creating an archive-tribe_organizer.php?

    Had a look here, but didn’t see anything on it. https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/#templates

    #29481
    Barry
    Member

    Theoretically, except that archives are not enabled for the organizer post type. If you change that facet then it should work.

    #29538
    Will
    Participant

    At some point elsewhere on the web I found a function someone posted to filter or adjust the Organizer Post Type. I’ll search for that again—I’d prefer to alter the plugin code as little as possible—but it would definitely help to enable the archives for Organizer, as that is a direct request from my client and a major piece of the functionality of this site. Worst case scenario is I just build my own wp_query on a page, that will work just fine too.

    #29543
    Barry
    Member

    Yep, you should be able to change that property (of the organizer post type I mean) … could be worth a quick skim through the Codex.

    #29545
    Will
    Participant

    Yep, somewhere near the register_post_type function I’m sure is an ability to “update_post_type” or something to that effect. I’ll give it a read/search.

    #30085
    Will
    Participant

    Just to update this for anyone else looking for this, it IS possible to update the tribe_organizer post type using register_post_type in your functions.php. As per the WP codex, register_post_type is used to “create or modify a post type”.

    I uploaded an example out of a project I’m working on now here: http://pastebin.com/HzMGiXiF
    —That sets up an archive page for tribe_organizer, rewrites that path to /organizer/ and adds the ability to control the title (and thus the slug) of the organizer post type.

    However, please note that this will not automatically create a neat archive page like the events/single-venue.php creates. Unfortunately, that’s a little bit out of my scope, as for my own project, I just need that page to mimic the events/list.php, except with a custom wp_query to show all events that the selected organizer is attached to (which should be easy enough).

    However, to give you a headstart, you’ll need to create a template file in your main child theme folder (not in the /events/ subfolder) called single-tribe_organizer.php, as per the WP Codex on custom post type templates. That will automatically be used when any single organizer is loaded in.

    From there it should be a matter of mimicking the existing single-venue.php html and styles, and just swapping out the information displayed for organizer specific info.

    I’ll post back in a bit with the custom wp_query to use to display events associated with the organizer. First, though, I need to go get some ice cream. 😉

    #30086
    Will
    Participant

    I should have posted the link to the WP Codex for templates above, but since I didn’t, I’ll do it here: http://codex.wordpress.org/Post_Type_Templates

    #30112
    Barry
    Member

    Thanks for updating the thread with your solution (so far), Will. We’ll leave this open a little longer in the event there’s anything else you want to add. Cheers!

    #30124
    Will
    Participant

    Yep, I got distracted and haven’t put together the query for this page to make it similar to the venues page, if you don’t mind leaving it open that long, it may serve someone else trying to do something similar. Thanks! Happy New Year!

    #30129
    Barry
    Member

    Absolutely, and a happy new year to you too 🙂

    #30220
    Will
    Participant

    Just to follow up, as I keep forgetting about this: in my single-tribe_organizer.php file, I reset the loop with this query_post() to grab events that belonged to the organizer page I’m on:

    http://pastebin.com/7VJ4cfxV

    Using that, as well as some other customizations, theoretically you could recreate an organizer page similar to the venue single page.

    #30299
    Barry
    Member

    Cool 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Organizer Archive Page (similar to Venue Archive Page)’ is closed to new replies.