Changed class to generic custom post type