Added chp_post_exists function to pages.php