I'm doing this site web where I have three outstanding notes and below the rest of the notes uploaded, which I would like to do is that in those below I do not show the ones that are already up, that I do not repeat them. The problem is that I do not know how to use the query to get them out.
<!-- NOTAS DESTACADAS -->
<?php
$home_args = array(
'post_type' => 'post',
'meta_query' => array(
array(
'meta_key' => 'notas_destacadas',
'value' => '1',
'compare' => '!=',
'orderby' => 'meta_value_num',
'order' => 'DESC',
),
),
'showposts' => 3,
);
$wp_query_home = new WP_Query( $home_args );
if ($wp_query_home-> have_posts ()) {
while ($wp_query_home-> have_posts ()) {
$wp_query_home-> the_post ();
?>
<!-- NOTAS DESTACADAS FINAL -->
<?php
$home_args = array(
// 'post__not_in' => array( '1,2,3' ),
'post_type' => 'post',
'orderby' => 'meta_value_num',
'order' => 'DESC',
'showposts' => 8,
);
$wp_query_home = new WP_Query( $home_args );
if ($wp_query_home-> have_posts ()) {
$counter = 0;
while ($wp_query_home-> have_posts ()) {
$wp_query_home-> the_post ();
?>
<!-- fila 1 -->
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 lib-item">
<a href="<?php the_permalink(); ?>">
<div class="lib-panel">
<div class="row box-shadow">
<div class="col-md-4">
<figure class="snip1208" style="width: 100%;">
<?php echo get_the_post_thumbnail(); ?>
<!-- <img class="image img-responsive" src="images/destacada1.png" alt="..."/> -->
<?php if(get_field('agregar_icono_a_la_nota')): ?>
<div class="date">
<img class="icon image img-responsive" src="<?php the_field('imagen_icono_nota') ?>" alt="...">
</div>
<?php endif; ?>
</figure>
</div>
<div class="col-md-8 lib-panel">
<div class="contenido">
<div class="author">
<span><?php echo get_the_date(); ?></span>
<a href="<?php the_permalink(); ?>" title="<?php cortarTexto(get_the_title( ), 300,"") ?>"><h4><?php cortarTexto(get_the_title( ), 30,"...") ?></h4></a>
</div>
<div>
<p><?php cortarTexto(get_the_excerpt( ), 100,"...") ?></p>
</div>
</div>
</div>
</div>
</div>
</a>
</div>
<?php
$counter++;
if ($counter == 2) {
?>
<div class="clearfix"></div>
<br>
<?php
$counter = 0;
}
}
}
?>
<?php wp_reset_query(); ?>