Added new function for binding categories to posts