A function for temporarily changing the WordPress post context
If you’ve ever found yourself in a situation where you need to render something from some other post whilst in the context of another, you may have ended up just overriding the global $post variable. It works fine but can be problematic where you mess it up or just forget to clean up after yourself. […]