Skip to content

Instantly share code, notes, and snippets.

@PaulHughes01
Last active December 17, 2015 10:09
Show Gist options
  • Select an option

  • Save PaulHughes01/5593064 to your computer and use it in GitHub Desktop.

Select an option

Save PaulHughes01/5593064 to your computer and use it in GitHub Desktop.
To have archive pages exist for venues and organizers in Modern Tribe's The Events Calendar plugin.
<?php
// Insert this into your functions.php file:
add_filter( 'tribe_events_register_venue_type_args', 'my_modification_of_post_type_args', 10, 1 );
add_filter( 'tribe_events_register_organizer_type_args', 'my_modification_of_post_type_args', 10, 1 );
function my_modification_of_post_type_args( $args ) {
$args['has_archive'] = true;
// You could also assign a string to has_archive, which would be the archive slug:
// $args['has_archive'] = 'venues';
// Obviously then you need to break this into two functions, one for venues and one for organizers,
// that hook into their respective hooks, above.
return $args;
}
@alloyking

Copy link
Copy Markdown

Paul, how did you manage to load the archive template. I've tried placing archive-venue.php in about every location I can think of without any luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment