Adding admin for specific users

You can use add_role function : add_role( $role, $display_name, $capabilities ); Just set your custom values as you wish : add_role(‘basic_contributor’, ‘Basic Contributor’, array( ‘read’ => true, // True allows that capability ‘edit_posts’ => true, ‘delete_posts’ => false, // Use false to explicitly deny )); Plugin : https://wordpress.org/plugins/user-role-editor/

translate_user_role doesn’t work

Please note that translate_user_role doesn’t work in the front-end currently. Here is a workaround, you can place this in your theme: add_action( ‘init’, ‘load_admin_textdomain_in_front’ ) function load_admin_textdomain_in_front() { if ( ! is_admin() ) { load_textdomain( ‘default’, WP_LANG_DIR . ‘/admin-‘ . get_locale() . ‘.mo’ ); } }

List users of specific role instead of removing them with specific role

To fetch users from a specific role, you can use the role parameter of the get_users function. Each role has a specific ID; for WordPress’ native roles, these are administrator, editor, author, contributor and subscriber. In your case, you would want to fetch only subscriber users: $allUsers = get_users( array( ‘orderby’ => ‘post_count’, ‘order’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)