If you have multiple dynamic blocks with a post loop on a page, how do you avoid duplicates from inside the render_callback function?
In PHP I recall these ways Static variables Class properties Databases, Files, Memory (might be flushed though) to preserve a state, in a hook’s callback, that is called multiple times in WordPress and in the order I would consider using myself but it depends on the context (eg WP transients, that store data that expires, … Read more