adding a function to display custom fields of a given post type