Last active
December 17, 2015 10:09
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.