Site icon Hip-Hop Website Design and Development

If you have multiple dynamic blocks with a post loop on a page, how do you avoid duplicates from inside the render_callback function?

I’m building dynamic blocks to customize the blog index into more of a magazine style layout, featured posts, categories, other content, all mixed together. My dynamic blocks are able to render a loop and post content just fine, but I cannot pass a list of IDs from the render_callback block function to itself when it displays multiple times on the same page, leading to duplicate posts in this block when used in various places on a page.

If you have multiple dynamic blocks rendering a get_posts loop, how do you pass a list of IDs to the next instance to avoid duplicates?