Title: Duplicate posts on posts page
Last modified: July 2, 2021

---

# Duplicate posts on posts page

 *  Resolved [backinblack](https://wordpress.org/support/users/backinblack/)
 * (@backinblack)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/duplicate-posts-on-posts-page/)
 * Is it possible to have two different post grids on a page that show posts from
   all categories, but don’t show the first few posts in each one? As an example,
   I have a post grid with all categories, followed by post grid that only shows
   posts from one category, and then another post grid that shows all categories
   again. I’d like to show the last four posts in the first ‘all categories’ grid,
   and continue with 5-8 in the other ‘all category’ post grid.
 * All in all I’m really enjoying your plugin.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [BSF – Sweta Kumari](https://wordpress.org/support/users/swetakumari/)
 * (@swetakumari)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/duplicate-posts-on-posts-page/#post-14633778)
 * Hello [@backinblack](https://wordpress.org/support/users/backinblack/) ,
 * To show your **first Post Grid** with all categories containing first four posts,
   you have to select the `Posts Per page` as `4` from [here](https://share.bsf.io/JruDm26z).
 * And for the **second post grid**, you can use the following filter.
 * => To apply different filters for a specific block you need to add a unique class
   to the block from the [Advanced Tab](https://imgur.com/qAye5Tn) of Post Grid 
   Block.
 * => You need to get the [post IDs](https://imgur.com/oaQlfqi) of the Pages or 
   Posts you want to exclude.
 * => After that, you need to add the following filter in your child theme’s functions.
   php file.
 *     ```
       function specific_post_filter_post_query( $query_args, $attributes) {
        // Unique class name added from Advanced tab for Post Grid.
        if ( 'my-post-grid-class' == $attributes['className'] ) {
        // 123 and 456 is the post id you want to exclude.
        $query_args['post__not_in'] = array( 123,456 );
        }
        return $query_args;
       }
       add_filter( 'uagb_post_query_args_grid', 'specific_post_filter_post_query', 10, 2 );
       ```
   
 * I hope that helps. Let me know how it goes.
 * Regards,
    Sweta
 *  [BSF – Sweta Kumari](https://wordpress.org/support/users/swetakumari/)
 * (@swetakumari)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/duplicate-posts-on-posts-page/#post-14643200)
 * Hello [@backinblack](https://wordpress.org/support/users/backinblack/) ,
 * We haven’t heard back from you in a while, so I’m going to mark this as resolved–
   if you have any further questions, you can start a new thread.
 * Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Duplicate posts on posts page’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-addons-for-gutenberg/assets/icon-256x256.gif?rev
   =3240412)
 * [Spectra Gutenberg Blocks – Website Builder for the Block Editor](https://wordpress.org/plugins/ultimate-addons-for-gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-addons-for-gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-addons-for-gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-addons-for-gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-addons-for-gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-addons-for-gutenberg/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [BSF – Sweta Kumari](https://wordpress.org/support/users/swetakumari/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/duplicate-posts-on-posts-page/#post-14643200)
 * Status: resolved