add functionality for custom post types and add options values to database