Good morning everyone, I have a site that I'm messing around where at home has a posts slide, where big appears the featured post and next to right 3 small posts. My problem is that in the column of 3 posts, also appears the featured post, that is, in addition to it large in the left column, it appears small in the right column. How can I make sure he does not show this same post? Actually, the featured post is the last post inserted by my client.
Follow the code:
<div class="featured-posts-wrap">
<div class="row">
<div class="col-9 nopadding">
<div class="blog-title">
<h2>notícias/</h2>
</div>
<div id="latest-posts">
<div class="tab-container">
<?php
$displayposts = new WP_Query();
$displayposts->query('posts_per_page=3');
while ($displayposts->have_posts()) : $displayposts->the_post();
$tab_number = $displayposts->current_post + 1;
?>
<div id="tab<?php echo $tab_number;?>"class="tab_content">
<div class="post clearfix">
<?php if ( has_post_thumbnail() ) { ?>
<div class="post-image">
<?php the_post_thumbnail(); ?>
</div>
<?php } ?>
<div class="meta-wrap">
<div class="author-wrap"><p><?php the_category(', '); ?></p></div>
</div>
<div class="post-content">
<div class="post-title">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="read-wrap"><a href="<?php the_permalink(); ?>">Leia mais</a></div>
</div>
</div>
</div>
<?php endwhile; ?>
</div>
<ul class="nav tabs">
<?php
while ($displayposts->have_posts()) : $displayposts->the_post();
$tab_number = $displayposts->current_post + 1;
?>
<li>
<div class="meta-wrap">
<div class="author-wrap"><p><?php the_category(', '); ?></p></div>
</div>
<h2><a href="javascript:void(0);" id="link<?php echo $tab_number;?>"><?php the_title(); ?></a></h2>
<div class="read-wrap"><a href="<?php the_permalink(); ?>">Leia mais</a></div>
</li>
<?php endwhile; ?>
</ul>
</div>
</div>
Follow the image of this block to your understanding:
Thanks in advance for your attention!