wordpress snippets last updated   : April 22, 2014
we now have 631 snippets

List All Available wordpress Roles

wordpress snippet

Here is a snippet showing how to list all available roles. I recently used this snippet to add a role selector in the registration page. You could also use it for user searches, or post filters.

read more

Redirect based on user roles or capabilities

wordpress snippet

Redirecting based on a user role or capabilities could be a valuable addition depending on the needs of your WordPress site. This would allow you to redirect specific capabilities to a custom page with details about new content or features. You could also use this to redirect users with higher user roles directly to the WordPress wp-admin. For more details on the capabilities available in wordpress visit the wordpress codex. To use this snippet just add it to the functions.php of your wordpress theme and you will be redirect users based on roles or capabilities like a pro.

read more
jqsnipp.com | we just launched jquery snippets website