Updated by
Deleted
non-admins- Ignore whitespace
-//The 3 following functions are ment for non admins to stay only in the website and never go to the dashboard
-//This functions redirects non admins to the website instead of the dashboard since they dont have admin bar they cant go into the dashabord
- return ( is_array( $user->roles ) && in_array( 'administrator', $user->roles ) ) ? admin_url() : site_url();
-/*I recently found this other snippet, wich way more easy to customize and can be combine with the admin bar remove from above*/
Added
non-admins.php- Ignore whitespace
+//The 3 following functions are ment for non admins to stay only in the website and never go to the dashboard
+//This functions redirects non admins to the website instead of the dashboard since they dont have admin bar they cant go into the dashabord
+ return ( is_array( $user->roles ) && in_array( 'administrator', $user->roles ) ) ? admin_url() : site_url();
+/*I recently found this other snippet, wich way more easy to customize and can be combine with the admin bar remove from above*/