diff --git a/archive.php b/archive.php index 1b8a7c1..6c1b15a 100644 --- a/archive.php +++ b/archive.php @@ -30,12 +30,11 @@ endif; '10' ) ); - - elseif ( is_category( 'resources' ) ): - get_template_part( 'template-parts/section', 'categoryposts', array( 'category_name' => 'resources', 'post_per_page' => '10' ) ); + elseif ( is_category( 'news' ) ): + // get_template_part( 'template-parts/section', 'categoryposts', array( 'category_name' => 'news', 'post_per_page' => '3' ) ); + get_template_part( 'template-parts/section', 'categoryposts', array( 'post_per_page' => '3' ) ); elseif ( is_category( '' ) ): get_template_part( 'template-parts/section', 'categoryposts', array('post_per_page' => '6' ) ); diff --git a/template-parts/section-categoryposts.php b/template-parts/section-categoryposts.php index ae7e3b1..219eb1a 100644 --- a/template-parts/section-categoryposts.php +++ b/template-parts/section-categoryposts.php @@ -8,24 +8,18 @@ ?> - 'news', 'post_per_page' => '3' ) ); - $thiscategory = $args['category_name']; + // $thiscategory = $args['category_name']; $howmanyposts = $args['post_per_page']; -?> + $thiscategory = esc_html( get_the_category()[0]->name ); + ?>
-

- -

+

$thiscategory, 'posts_per_page' => $howmanyposts ) ); ?> @@ -70,4 +64,3 @@
-