The Code

Always call

afterwards to reset the global $post value. Otherwise, any attempt to retrieve data from the page will return null.