I am having some trouble building the category template i want. Here is an example of one of my categories: http://transcorrect.bg/pi-de/category/versicherungen/
I want this field http://prntscr.com/k2d5xg to show posts only from the current category. I am attaching the code i am using right now, but it is only for specific category. What i want is to be on archive.php file as a code, that takes dynamically the category ID.
Minimal example of code
<div class="row">
<div class="headline-box" style="margin-bottom:10px;">Weitere Artikel</div>
<?php
// get the top-category posts
$the_query = new WP_Query(array(
'category_name' => 'Versicherungen',
'posts_per_page' => 10,
));
if ($the_query->have_posts()) : ?>
<?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
<div id="list-news-home" class="col-lg-12" style="padding-top:10px;padding-bottom:10px;">
<img src="http://transcorrect.bg/pi-de/wp-content/uploads/2018/07/arrow1.png" style="padding-right:20px;"><a href="<?php echo get_permalink(); ?>" style="color:#00315C"><?php the_title(); ?></a>
<a href="<?php echo get_permalink(); ?>" style="float:right"> [ mehr ] </a>
</div>
<hr style="margin-top:50px;margin-bottom:10px">
<?php endwhile; ?>
<?php endif; ?>
</div>
I can't figure out how to get it so if someone has made something similar i will be thankful to know how :)