There are many globals that are being set in a loop, not only $post
, and you need to set all of them to get exactly the same behavior. To get this it is not enough to set $post
but you also need to use setup_postdata
There are many globals that are being set in a loop, not only $post
, and you need to set all of them to get exactly the same behavior. To get this it is not enough to set $post
but you also need to use setup_postdata