WordPress post validation – I want to make it require AT LEAST one category

A WordPress post can be assigned to a category. I need a validation hook or a save_post hook and do some logic so a post has to have between 1 and 5 categories selected in order to be saved. There’s a save_post hook but I don’t know how to use it to add extra validation.

All help greatly appreciated!

Related posts

Leave a Reply