I'm following your initial question. In your backend, create a page with the title Test 1
, which should result in the page slug test-1
.
In your child theme folder, create a page template, using the filename page-test-1.php
. Wordpress will be loading this template, following this pattern: page-$slug.php
. For more details, see here: https://developer.wordpress.org/files/2014/10/wp-hierarchy.png.
In your page template, load the header and footer of your theme and query your posts. By default, Wordpress would display the content of that page, but since you want to display all of your posts, you need a custom query:
<?php
get_header();
$args = [
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => -1
];
$posts = new WP_Query( $args );
while ( $posts->have_posts() ) : $posts->the_post();
?>
<article>
<?php
the_title( '<h1>', '</h1>' );
the_excerpt();
?>
</article>
<?php
endwhile;
get_footer();