• I was looking at menu-header.php in the wp-admin directory to see if there is a way to eliminate the Dashboard choice from the menu if the user is not an admin. I cannot find out where that happens.

    Do I have to take away the Dashboard page from the Subscriber role?

    Mel

Viewing 2 replies - 1 through 2 (of 2 total)
  • It’s at the top of menu.php that you need to edit.
    That won’t remove the page, just the link.

    FWIW, this is how I changed login redirect and site admin tabs on a K2 hack site. I will have several authors and public commenters will be required to register as subscribers. The login redirect now goes to the main blog page and the admin tab reads “My Profile” and goes to the profile page instead. Novice type users never have to deal with the dashboard, though I can get there if I need to. The other posters have access to the write and manage tabs from their profile.

    1) Changed line 170 of wp-login.php to

    $redirect_to = 'index.php';

    ((I changed wp-admin to index.php))

    2) Changed line 7 of /wp-admin/menu.php to

    $menu[20] = array(__('Dashboard'), 'read', 'index.php');

    ((I changed value from 0 to 20))

    3) Changed line 47 of template-functions-general.php to:

    $link = $before . '<a href="' . get_settings('siteurl') . '/wp-admin/profile.php/">' . __('My Profile') . '</a>' . $after;

    ((I changed /wp=admin/ to /wp-admin/profile.php/ and Site Admin to My Profile.))

    This was the simplest approach and worked great for us. The commenters and the other people who write posts at our org can click on “my profile” and go to something familiar that makes sense, without being thrown by landing at the dashboard. I just let people sign up on their own and change the roles of internal people who want to post.

    It’s pretty easy maintenance. WordPress rules.

    If you want to see it in action, go to https://dce.unm.edu/dceblog

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Taking Dashboard out of admin menu’ is closed to new replies.