Show User Profile Picture in Admin
Display user profile picture in the admin user list. <?php function add_profile_picture_column($columns) { $columns['profile_picture'] =…
Add User Registration Date to User Profile
Add the registration date to user profiles. <?php function add_registration_date($user) { $register_date = get_the_author_meta('user_registered', $user->ID);…
Disable File Editor
Disable the theme and plugin editor. <?php define('DISALLOW_FILE_EDIT', true);
Redirect After Logout
Redirect users to a custom URL after logout. <?php function custom_logout_redirect() { wp_redirect(home_url('/goodbye')); // Change…
Auto Login on Registration
Automatically log in users after they register. <?php function auto_login_after_registration($user_id) { wp_set_auth_cookie($user_id); wp_redirect(home_url()); exit; }…
Hide Admin Bar for Specific User Roles
Hide the admin bar for specific user roles. <?php function hide_admin_bar_for_roles() { if (current_user_can('editor') ||…
Send a Custom Welcome Email After Registration
Send a custom welcome email to new users after they register. <?php function custom_welcome_email($user_id) {…
Change the Admin Login URL
Change the default WordPress login URL from /wp-login.php to a custom URL. <?php function custom_login_url()…
Limit Login Attempts
Implement a basic login attempt limit to protect against brute force attacks. <?php function limit_login_attempts($user,…
Change the Login URL
Redirect the login page to a custom URL. <?php function custom_login_url() { return home_url(); //…