Fixing so post can be created and page type value is outputted. Fixed so wp_insert_post_data only works on post