2 Custom Post Types In 1 Archive Page?

There are a few ways to go. The ‘traditional’ way I think would be to create a “Page Template“, and on that template use a custom query (WP_Query) to display the posts from the two post types ordered by date. You’d then add a WordPress “Page” in the control panel and choose your new template from the Attributes panel at the left.

This is a sample of how that page template might look:

<?php
/**
* Template Name: News & Announcements Archive
*/

$args = array(
    'post_type' => array( 'announcement', 'news' )
);
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) : 
    // Start the Loop 
    while ( $the_query->have_posts() ) : $the_query->the_post(); 
        get_template_part('template-parts/archive-announcement-content', get_post_type());
    // End the Loop 
    endwhile; 
else: 
// If no posts match this query, output this text. 
    _e( 'Sorry, no posts matched your criteria.', 'textdomain' ); 
endif; 
 
wp_reset_postdata();
?>

In newer versions of WordPress, though, you could skip that step and use a Block to display all the posts from those two post types. In future versions of WordPress I think this will be possible via core Blocks, but right now (WP 5.8.2) you’ll have to either build the Block yourself or use a plugin that provides such a block.

error code: 523