• Hi, does anyone know if we can give users different dashboards depending on user roles?

    For example I would like all contributors to just see a write post page and their profile, nothing else.

    While I would like admin to still be able to see the incoming links etc.

    Thanks for your help

Viewing 15 replies - 1 through 15 (of 16 total)
  • And what happened when you created users with different levels and logged in with their credentials? What did you see? Give us a detailed explanation ??

    Thread Starter Microdot

    (@microdot)

    A normal user gets to see the incoming links and comments etc, I’d like admin only to be able to see this.

    So really, I’d like an admin to have the exact same thing as default but for users to not see the dashboard.. apart from write post and profile.

    I don’t like them seeing comments and incoming links etc.

    Thanks for yout help,

    I made a separate topic earlier because I didn’t see this one. I guess if falls under the same lines of what you want, so I will post it here to improve the odds of getting an answer.

    —–

    I want to remove some links that are seen based on the user’s role.

    Right now a Subscriber is only able to see the following links in the dashboard: Dashboard | Profile which is fine since they don’t need to see anything else.

    The Contributor is able to see Dashboard | Write | Manage | Comments | Profile and I want them only to see Dashboard | Write | Profile.

    How would I be able to change this?

    Thread Starter Microdot

    (@microdot)

    That’s kind of what I’d like to do but also stop them from seeing the incoming links and comments on the first page of the dashboard.

    Looks like we are on our own.

    Thread Starter Microdot

    (@microdot)

    Whats new lol

    Microdot, I think I figured everything out.

    I’m using version 2.3.1 and I am not at my normal computer at the moment – where my test server is at.

    I will post the changes that I made later when I do get to my computer.

    I used this Roles and Capabilities for reference.

    ——–

    To remove Comments in moderation (1) for all users except Administrator:

    Open: wp-admin/index.php

    Find: `<?php if ( $numcomments ) : ?>
    <p><?php echo sprintf(__(‘Comments in moderation (%s) »’), number_format_i18n($numcomments) ); ?></p>
    <?php endif; ?>`

    Change To: `<?php if ( current_user_can(‘import’) ) { ?> <?php if ( $numcomments ) : ?>
    <p><?php echo sprintf(__(‘Comments in moderation (%s)’), number_format_i18n($numcomments) ); ?></p>
    <?php endif; ?><?php } ?>`

    Save & Close

    I added: <?php if ( current_user_can(‘import’) ) { ?> at the beginning and <?php } ?> at the end.

    ——–

    To show only Dashboard | Write | Profile for everybody except Administrator:

    Open: wp-admin/menu.php

    Find: `if (strpos($_SERVER[‘REQUEST_URI’], ‘edit-pages.php’) !== false)
    $menu[5] = array(__(‘Write’), ‘edit_pages’, ‘page-new.php’);
    else
    $menu[5] = array(__(‘Write’), ‘edit_posts’, ‘post-new.php’);
    if (strpos($_SERVER[‘REQUEST_URI’], ‘page-new.php’) !== false)
    $menu[10] = array(__(‘Manage’), ‘edit_pages’, ‘edit-pages.php’);
    else
    $menu[10] = array(__(‘Manage’), ‘edit_posts’, ‘edit.php’);

    $menu[15] = array(__(‘Comments’), ‘edit_posts’, ‘edit-comments.php’);`

    Change To: `if (strpos($_SERVER[‘REQUEST_URI’], ‘edit-pages.php’) !== false)
    $menu[5] = array(__(‘Write’), ‘edit_pages’, ‘page-new.php’);
    else
    $menu[5] = array(__(‘Write’), ‘edit_posts’, ‘post-new.php’);
    if ( current_user_can(‘import’) )
    if (strpos($_SERVER[‘REQUEST_URI’], ‘page-new.php’) !== false)
    $menu[10] = array(__(‘Manage’), ‘edit_pages’, ‘edit-pages.php’);
    else
    $menu[10] = array(__(‘Manage’), ‘edit_posts’, ‘edit.php’);
    if ( current_user_can(‘import’) )
    $menu[15] = array(__(‘Comments’), ‘edit_posts’, ‘edit-comments.php’);`

    Save & Close

    I added: if ( current_user_can(‘import’) ) before and after the Manage commands.

    ——–

    You can change ‘import’ to something lower if you want someone lower than an Administator to be able to view.

    Thread Starter Microdot

    (@microdot)

    Youre a friggin star mate!

    Thank you

    Awesome! Works perfectly, thank you!

    I am using version 2.5 qand tried to insert this code on the page, as above, but this does not seem to work, as I still get all the links and the tables of links at the bottom of the page – please help me remove these links for users, other than admin, thank you

    I am sorry – it has got rid of the “Manage” button no problem, but I also like to remove the tables of links at the bottom of the page also for non-admin users, thank you

    Did anyone ever figure out how to simply redirect Non-Administrator (such as Editor and Contributor) to go DIRECTLY to “Write Post” instead of “Dashboard”?

    I don’t want to hide certain things on the Dashboard, I just don’t want them to land on the Dashboard whatsoever. I want only the Admin (me) to see the Dashboard.

    Yes Moshu I have created test logins with every User role, and tested what they see.

    I’m interested in this as well. I can’t stand having Contributors seeing comments in moderation, or any comments for that matter. I’d also like them to only see their own posts, period.

    BTW, I’m using Hide Dashboard to completely hide teh dashboard, and I’m using the terrific plugin WP-CMS Post Control to remove all the extra fields on the Write Page panel that are just confusing to the contributor.

    Please let me know if you have found a way to remove the “Manage Comments” tab from the page, without hacking the code. And also if you have found a way to show the post author only his own posts.

    There is a new Redirect Plugin available for WP 2.6.2 or higher.

    https://www.theblog.ca/wplogin-redirect

    Never say Never!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Different Dashboard Per Role’ is closed to new replies.