Local variable name in setup_postdata()
As noted in the documentation for setup_postdata(): setup_postdata() does not assign the global $post variable so it’s important that you do this yourself. Failure to do so will cause problems with any hooks that use any of the above globals in conjunction with the $post global, as they will refer to separate entities. So the … Read more