Exclude specific slug in ‘get_terms’

The get_terms() (see docs) function accepts the same args as WP_Term_Query(see docs) You have to get those terms Ids first and then pass it to the exclude arg: // default to not exclude terms $ids_to_exclude = array(); $get_terms_to_exclude = get_terms( array( ‘fields’ => ‘ids’, ‘slug’ => array( ‘graduate’, ‘job-market-candidate’, ‘graduate-student’, ‘research’ ), ‘taxonomy’ => ‘role’, … Read more

Allowing specific users to only add posts using certain custom taxomy terms

First hook the save_post action: http://codex.wordpress.org/Plugin_API/Action_Reference/save_post Then check capabilities: You have docs on that right? Then get_the_terms for the $post_id provided by save_post and the taxonomy you want to check. http://codex.wordpress.org/Function_Reference/get_the_terms Then if they are using a term (see note below) they are not allowed to use either stop/delete the post, set a warning, or … Read more