create a custome dashbord (without plugin)
-
Hello!
I would like to have this function :
– when the user (not admin) is logged, the site redirect user to home page
– and when the user(logged) click to dashbord, it redirect to another page (not the originale dashbord of wordpress back end ) who have different menu : * profile
* loggout
– and if the user (logged) clik the menu profile, it redirect to /wp-admin/profile.php
I have tried this snippetfunction prevent_profile_access() { if (current_user_can('subscriber')) { if (strpos ($_SERVER ['REQUEST_URI'] , 'wp-admin/profile.php' )){ wp_redirect (home_url('/candidat_dasboard')); die(); }} return '';
but when I want to go to /wp-admin/profile.php, it redirect me to the same page (candidat_dashbord).
Please,How to solve this?
the wordpress site use ACF plugin for display contentCould I have a custome dashbord without using another plugin?please!!!
code snippet are welcome because I work in wordpress site with a personalized theme.Thanks in advance
- The topic ‘create a custome dashbord (without plugin)’ is closed to new replies.