Вот решение, которое мне помогло. Вывод новостей в 3 столбика.
<div class="col-md-10 centerM">
<div class="row" style="margin-top: 10px;">
<?php $args = array(
'numberposts' => '6',
'category' => '',
'orderby' => 'date',
'order' => 'DESC',
'post_type' => 'post',
'post_status' => 'publish',
'suppress_filters' => true,
);
$posts = get_posts( $args );
foreach($posts as $post){ setup_postdata($post);
?>
<div class="col-md-4 col-lg-4 centerM">
<div class=" newsPost">
<img src="<?php the_post_thumbnail_url() ?>" alt="">
<p><i class="fa fa-hourglass-end"></i> <?php the_time('F, d, Y'); ?></p>
<p><?php the_title();?></p>
<p><?php the_excerpt();?></p>
<a href="<?php the_permalink();?>" style="text-decoration: underline; color: #8A8A8A;">Читать</a>
</div>
</div>
<?php
}
wp_reset_postdata();
?>
</div>
</div>
.newstext{
margin: 0px;
padding: 0px;
}
.newstext p{
margin: 0px;
padding: 0px;
color: #008629;
font-size: 40px;
}
.newsPost{
padding-bottom: 20px;
margin-bottom: 15px;
background-color: #ffffff;
transition: 0.4s;
}
.newsPost:hover{
box-shadow: 0.4em 0.9em 20px rgba(122,122,122,0.5);
}
.newsPost p:nth-child(2){
font-size: 13px;
margin-bottom: 0px;
padding-left: 10px;
padding-bottom: 10px;
color: #8A8A8A;
}
.newsPost p:nth-child(3){
font-size: 20px;
margin-bottom: 0px;
padding-left: 10px;
padding-bottom: 10px;
}
.newsPost p:nth-child(4){
font-size: 13px;
margin-bottom: 0px;
padding-left: 10px;
padding-bottom: 10px;
}
.newsPost a{
font-size: 15px;
padding-left: 10px;
padding-bottom: 10px;
}
.newsPost img{
width: 100%;
padding-bottom: 10px;
}