Search blog

Saturday, August 19, 2017

View all the User Role's Name & Slug of your Wordpress Site

Use the code below to view the Name & Slug of all the User Roles of your Wordpress site. You may insert the code in the header.php or footer.php of your Theme file. After your are done using it, please do not forget to remove the code from your site.

 $wp_roles = new WP_Roles();  
 $names = $wp_roles->get_names();  

No comments:

Post a Comment

Thank you for your Feedback!

Top 5 Posts (Weekly)