Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="owl-carousel" >
- <?php
- $args = array (
- 'posts_per_page' => 3,
- 'cat' => '-36'
- );
- $entradasDestacadas = new WP_Query($args);
- if($entradasDestacadas-> have_posts());
- while($entradasDestacadas-> have_posts()) : $entradasDestacadas-> the_post();
- $do_not_duplicate[] = $post->ID;
- ?>
- <?php get_template_part( '/template-parts/blog-entries-featured', get_post_format() ); ?>
- <?php
- endwhile;
- wp_reset_postdata();
- ?>
- </div>
- <div class="not-featured">
- <h3>Entradas Anteriores</h3>
- <?php
- $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- $args = array (
- 'cat' => '-36',
- 'paged' => $paged,
- 'posts_per_page' => 6,
- 'post__not_in' => $do_not_duplicate
- );
- $entradasAnteriores = new WP_Query($args);
- if ($entradasAnteriores-> have_posts() ) :
- /* Start the Loop */
- while ($entradasAnteriores-> have_posts() ) : $entradasAnteriores-> the_post();
- if ( in_array( $post->ID, $do_not_duplicate ) ) continue;
- ?>
- <?php get_template_part( '/template-parts/blog-entries', get_post_format() ); ?>
- <?php
- endwhile;
- wp_reset_postdata(); ?>
- <div class="pagination">
- <div class="btn nav-prev"><?php next_posts_link(__('Más antiguas', 'thematic'),$entradasAnteriores->max_num_pages) ?></div>
- <div class="btn nav-next"><?php previous_posts_link(__('Más recientes', 'thematic'),$entradasAnteriores->max_num_pages) ?></div>
- </div>
- </div>
- <?php
- endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement