Title: Function Reference / add_role()
Last modified: August 20, 2016

---

# Function Reference / add_role()

 *  Resolved [Jan K.](https://wordpress.org/support/users/90jkrug/)
 * (@90jkrug)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/function-reference-add_role/)
 * Hi,
 * i would like to add a new usergroup to ALL sites (without plugin).
 * [http://codex.wordpress.org/Function_Reference/add_role](http://codex.wordpress.org/Function_Reference/add_role)
 * 1. In which file do i have to add the add_role() function to make this happen?
   
   2. Where can i set my new user role to the default user role for all new users?
 * Thank a lot!!
    Jan

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [whiteatom](https://wordpress.org/support/users/whiteatom/)
 * (@whiteatom)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/function-reference-add_role/#post-2423969)
 * You’ll need to write a simple plugin and have the add_role part of the activation
   script. Then you can remove the plugin. If you add it to your themes functions
   file or anywhere else, it will get called over and over.
 * To make it the default, go to the settings tab in the edit site page of the network
   admin? About 40 options down, you’ll see Default Role… Enter the slug for your
   new role.
 * Cheers,
 * whiteatom
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 6 months ago](https://wordpress.org/support/topic/function-reference-add_role/#post-2423985)
 * Of course if you remove the plugin, it won’t create it for NEW sites.
 * You may want to try manually adding it to existing sites, and then making a plugin(
   toss it in mu_plugins) to create it on new sites when they’re activated.
 *  Thread Starter [Jan K.](https://wordpress.org/support/users/90jkrug/)
 * (@90jkrug)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/function-reference-add_role/#post-2424093)
 * Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Function Reference / add_role()’ is closed to new replies.

## Tags

 * [add_role](https://wordpress.org/support/topic-tag/add_role/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 3 replies
 * 3 participants
 * Last reply from: [Jan K.](https://wordpress.org/support/users/90jkrug/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/function-reference-add_role/#post-2424093)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
