put in some checks for post type page