Search This 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.

 <?php  
 $wp_roles = new WP_Roles();  
 $names = $wp_roles->get_names();  
 print_r($names);  
 ?>  

No comments:

Post a Comment

Thank you for your Feedback!
www.evagabond.me

Top Magento Hosting:

Top 5 Posts (Weekly)