template cat added

This commit is contained in:
ed barz 2023-03-27 22:28:07 +02:00
parent 9a1fe99035
commit 594078d986
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<?php
/*
Template Name: Custom Category Page Template
*/
$args = array(
'category_name' => 'my-category-slug',
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) :
while ( $query->have_posts() ) : $query->the_post();
// your post content here
endwhile;
wp_reset_postdata();
else :
// no posts found
endif;
?>