A snippet of my custom post type function