Fix post type deprecation error