Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › Problems creating new post with user having category/taxonomy ID restriction › Reply To: Problems creating new post with user having category/taxonomy ID restriction
In my opinion, the correct way to solve this issue is for you to create a custom taxonomy called “ure” (for example) which has a single term called “allow” — and you assign THAT term to any new post by that user. This way, this term will never be deleted by any other plugin or function, your custom taxonomy is hidden and doesn’t clash with existing taxonomies, and by adding THAT you will ensure a user can always add posts even before or without setting the taxonomy he’s restricted to.
Thank you for the brilliant idea and useful note about
wp_set_post_terms() function. Proposed decision allows to add new post without visible term assigned. This allows to have an option to “start a new post without any taxonomy” too.
I will apply this enhanced logic to the next update. Thanks again.