Updated custom post types handling