In the theme you can use “archive-news.php”, “archive-calander.php”, “archive-blog.php” or you can use just a single file “archive.php” to style all three post types.
if ( !file_exists( trailingslashit( get_stylesheet_directory() ) . ‘archive-news.php’ ) || !file_exists(trailingslashit( get_template_directory() ) . ‘archive-news.php’
|| !file_exists( trailingslashit( get_stylesheet_directory() ) . ‘archive.php’ )
|| !file_exists( trailingslashit( get_template_directory() ) . ‘archive.php’ ) ) {
This would allow custom themes to work correctly.
https://developer.wordpress.org/themes/basics/template-hierarchy/#custom-post-types
Hi Morten
Thank for for the quick response. I have tested your latest solution and my custom template (archive-news.php) displays. “archive.php” does not work with this solution. “archive.php” styles any archive post type page and is the parent to “archive-{post type}” template pages.
Cheers
Chris