Hello I have the following custom wordpress query. This displays all the blog posts just fine.
<?php $mymain_query = new WP_Query( array( 'post_type' => 'post','posts_per_page' => '10' ) ); while($mymain_query->have_posts()) : $mymain_query->the_post(); ?>
//shortened code below
<div class="blog-post">
<h5><?php the_title(); ?></h5>
<p><?php the_content(): ?></p>
</div>
<?php endwhile; ?>
<?php wp_reset_postdata(); // reset the query ?>
But I when I plug this into archive.php
it is still calling all blog posts instead of the ones in that category.
Can anyone suggest how to edit my code to only show the blog posts in that specific category?
Thanks!