# Pagination for group of post articles

**URL:** <https://forum.pinegrow.com/t/pagination-for-group-of-post-articles/594>\
**Category:** WordPress\
**Created:** [January 13, 2017, 9:50am UTC](https://forum.pinegrow.com/t/pagination-for-group-of-post-articles/594 "2017-01-13T09:50:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrazekmichal](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@mrazekmichal](https://forum.pinegrow.com/u/mrazekmichal)\
**Post date:** [January 13, 2017, 9:50am UTC](https://forum.pinegrow.com/t/pagination-for-group-of-post-articles/594/1 "2017-01-13T09:50:50Z")

</div>

Good morning  
I would like to ask you on possibility how in the loop inside WP theme create this.  
I have one page composite from group of single post articles as on figure. Is possible to create pagination link for group articles ( for examples groups 1-3, 4-6,…) (page 1,2,3) ?

![](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/1X/208923b2f464b98e781e43f3e9034fa4e3864296.jpg)

If I am using this setting I don’t show older post articles.

_Loop / pagination parameters_  
_Post per page = 3_

Thank you for your tips.

Michal

---

<div class="post-metadata">

**Author:** ![alexanderbiscajin](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@alexanderbiscajin](https://forum.pinegrow.com/u/alexanderbiscajin)\
**Post date:** [December 7, 2017, 7:40am UTC](https://forum.pinegrow.com/t/pagination-for-group-of-post-articles/594/2 "2017-12-07T07:40:45Z")

</div>

I have use this code to create custom WordPress loop with pagination.

```
<?php
get_header(); ?> <?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args = array( 'posts_per_page' => 4, 'paged' => $paged
);
$custom_query = new WP_Query( $args );
?> <!----start-------->
<div class="wrap">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main"> <?php while($custom_query->have_posts()) : $custom_query->the_post();
?> <div> <ul> <li> <h3><a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h3> <div> <ul> <div><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a></div> </ul> <ul> <p><?php echo the_content(); ?></p> </ul> </div> <div> </li> </ul> </div> <!-- end blog posts --> <?php endwhile; ?> <?php if (function_exists("pagination")) { pagination($custom_query->max_num_pages); } ?>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .wrap --> <!----end-------->
<?php get_footer();

```

I have seen that code on [https://www.wpblog.com/use-wp\_query-to-create-pagination/](https://www.wpblog.com/use-wp_query-to-create-pagination/) . Might be it will be helpful.
