Created a plist file which contains the categories and subcategories and we now pull these category names from the plist file when creating a post.