Adding code in to save categories details then get posts on app load - need to link categories and posts