Problem:
The user would like to create an archive template for the Organizers and the Venues post types that are registered by
TheEventsCalendar plugin.
Solution:
The plugin registers both post types without the option to have archives. We can hook into the registering process and change the arguments of the post types. This is an example for the Venues post types(slug: tribe_venue):
add_filter( 'register_post_type_args', 'change_tec_venue_cpt', 10, 2 ); function change_tec_venue_cpt( $args, $post_type ){ if( $post_type === 'tribe_venue' ){ $args['has_archive'] = 'venue'; $args['rewrite'] = array( 'slug' => 'venues', 'with_front' => true, ); } return $args; }
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Our next available supporter will start replying to tickets in about 1.04 hours from now. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - | - | 9:00 – 13:00 |
14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - | - | 14:00 – 18:00 |
Supporter timezone: Africa/Casablanca (GMT+01:00)
This topic contains 3 replies, has 2 voices.
Last updated by 3 years, 2 months ago.
Assisted by: Jamal.