Changing the Author for Venues and Organizers

Home Forums Calendar Products Events Calendar PRO Changing the Author for Venues and Organizers

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1167242
    Sean
    Participant

    Hi! It’s possible to change the Author of an Event when editing the Event in the Post Editor or on /wp-admin/edit.php?post_type=tribe_events. However, it is currently not possible to change the author of a Venue or Organizer. Is there a snippet available that can add this basic functionality so we can change the author of a Venue and/or Organizer within the WordPress admin?

    Thanks,
    Karly

    #1167396
    George
    Participant

    Hey Karly!

    This is possible with two steps. First, add a code snippet like the following to your theme’s functions.php file:


    if ( class_exists( 'Tribe__Events__Main' ) ) {

    /**
    * Add "author" support to venue and organizer post types.
    *
    * @return void
    */
    function tribe_add_authors_to_venues_and_organizers() {
    add_post_type_support( Tribe__Events__Main::VENUE_POST_TYPE, array( 'author' ) );
    add_post_type_support( Tribe__Events__Main::ORGANIZER_POST_TYPE, array( 'author' ) );
    }

    add_action( 'init', 'tribe_add_authors_to_venues_and_organizers' );
    }

    Then, head to the “edit” screens for venues and organizers and click “Screen Options” in the top right corner of the admin screen. This should reveal set of checkboxes—one checkbox should now be “Author”. Check this box if it’s not already, and you should have the same author control ability that you have with Events! (and posts, pages, etc…)

    Here is a screenshot of the screen options checkboxes—click for larger version:

    Cheers,
    George

    #1167411
    Sean
    Participant

    Good morning George,

    This is perfect, thank you so much! It’s exactly what I needed! The author is now showing up nicely when viewing the List of Venues/Organizers in the admin, as well as when editing a single Venue/Organizer.

    Thanks again!
    Karly

    #1167419
    George
    Participant

    Glad to help, Karly! Cheers. Make sure to keep a backup of this custom code…and come back to the forums any time if other issues or questions arise.

    Best of luck with your site,
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Changing the Author for Venues and Organizers’ is closed to new replies.