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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. 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+00:00)
This topic contains 3 Antworten, has 2 Stimmen.
Last updated by romanB-3 vor 2 Jahre, 6 Monate.
Assisted by: Jamal.