Witam
Mam strone na wordpressie gdzie są dwie podstrony z postami, chce aby na jednej stronie wyświetlały się wszystkie posty a na drugiej tylko 5 wraz z paginacją, w ustawieniach gdzie podaje ilość postów mam że chce ich 5 ale wtedy odnosi się to także do tej drugiej podstrony, ma ktoś pomysł jak w kodzie ograniczyć tą ilość ? :)
global $post;
$child_pages_query_args = array(
'post_type' => 'page',
'post_parent' => $post->ID,
'orderby' => 'menu_order'
);
$child_pages = new WP_Query( $child_pages_query_args );
if ( $child_pages->have_posts() ) : while ( $child_pages->have_posts() ) : $child_pages->the_post();
?>
<div class="child-thumb col-md-4" style="float:left; margin-bottom: 40px; text-align: center;">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
<div class="podmenu-tytul">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</div>
<div class="podmenu-tytul">
<?php the_date(); ?>
</div>
<?php the_tags(); ?>
</div>
<?php
endwhile; endif;
// Be kind; rewind
wp_reset_postdata();
?>