What does setup_postdata ($post ) do?
Template tag functions rely on global variables to access the post being processed and retrieve data from it or related to it. The main variable among these is $post, which holds the post object itself. In your example it’s not explicit, but what is happening is that your loop assigns data to $post. If its … Read more