wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

Add and remove wordpress user roles

wordpress snippet

With WordPress you can add and remove roles very easily. The first snippet will add a new role called “manager” with some basic capabilities. You can view the WordPress roles and capabilities page for more extensive details on the capabilities available that you can assign to a custom role. The second snippet will remove some of the existing roles “editor, author, contributor, subscriber” however this could also remove a custom role. NOTE: if you remove an existing role it will be gone! So please be careful when removing roles.

read more

Create new users automatically, Admin, Editor, Author, Contributor, Subscriber

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will automatically create a new user. Super Admin, Administrator, Editor, Author, Contributor, Subscriber

read more