Last active
October 25, 2019 07:37
-
-
Save bigdigital/e27256ca2ee1a66834359d0ed117ab99 to your computer and use it in GitHub Desktop.
The7, assign page template to archive Custom Post Type
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
add_filter( 'the7_archive_page_template_id', function( $page_id ) { | |
if ( ! $page_id ) { | |
if (is_post_type_archive('tribe_events')) //"tribe_events" - it is cuttom post type | |
$page_id = 9999; //replace to template page id | |
} | |
return $page_id; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment