I understand that I can copy my theme’s default blog template and change the code to make it display only posts from one category in the theme’s style. I tried tinkering with it, but to no result yet. This is the code in the theme:
$posts = new WP_Query( array('post_type'=>'post', 'paged'=>$paged) );
if( $posts->have_posts() ):
echo '<div class="list-posts">';
while( $posts->have_posts() ) : $posts->the_post();
get_template_part( 'content', get_post_format() );
endwhile;
echo '</div>';
wp_reset_postdata();
else:
echo '<div class="alert alert-error">'.esc_html__('Sorry. There are no posts to display', 'gon').'</div>';
endif;
I tried changing the values on while( $posts->have_posts() ) : $posts->the_post();
but to no success.
How can I make this work?