template cat added
This commit is contained in:
parent
9a1fe99035
commit
594078d986
|
@ -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;
|
||||
?>
|
||||
|
Loading…
Reference in New Issue