on my newssite i have the first post in a full-width column, after that all older post are in three columns per row. But now i want that wordpress put after every three columns a and to keeps the elements into rows. I tried to adjust the following solutions: Solution 1 Solution 2 Solution 3
But nothing of that will work.
Here is my code to get my posts:
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<div class=" entry-content">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; $c=0;?>
<?php while (have_posts()) : the_post(); ?>
<?php $c++;
if( !$paged && $c == 1) :?>
<?php get_template_part( 'template-parts/content', 'aktuelles-first' ); ?>
<div class="accordion">
<div class="row">
<?php else :?>
<?php get_template_part( 'template-parts/content', 'aktuelles' ); ?>
<?php endif;?>
<?php endwhile; ?>
<?php endif; ?>
</div></div>
</main><!-- #main -->
</div><!-- #primary -->
Is there any solution without changing my way to get the posts?