I have 2 custom post types (announcements and news) and I want to have their own archive pages (which I have, and they’re working) and an archive page that shows both posts types ordered by date.
How can I tell wordpress to give me all the posts of 2 custom post types?
<?php if ( have_posts() ) : ?>
<?php get_template_part('template-parts/archive-announcement-content', get_post_type()); ?>
<?php else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>