adding getoption method to post type class