WordPress.org

Ready to get started?Download WordPress

Forums

Different Dashboard Per Role (17 posts)

  1. Microdot
    Member
    Posted 6 years ago #

    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

  2. moshu
    Member
    Posted 6 years ago #

    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 :)

  3. Microdot
    Member
    Posted 6 years ago #

    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,

  4. Longhair
    Member
    Posted 6 years ago #

    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?

  5. Microdot
    Member
    Posted 6 years ago #

    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.

  6. Longhair
    Member
    Posted 6 years ago #

    Looks like we are on our own.

  7. Microdot
    Member
    Posted 6 years ago #

    Whats new lol

  8. Longhair
    Member
    Posted 6 years ago #

    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.

  9. Longhair
    Member
    Posted 6 years ago #

    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.

  10. Microdot
    Member
    Posted 6 years ago #

    Youre a friggin star mate!

    Thank you

  11. 8rittany
    Member
    Posted 6 years ago #

    Awesome! Works perfectly, thank you!

  12. britchat
    Member
    Posted 6 years ago #

    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

  13. britchat
    Member
    Posted 6 years ago #

    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

  14. Dgold
    Member
    Posted 5 years ago #

    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.

  15. slobizman
    Member
    Posted 5 years ago #

    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.

  16. Ripose
    Member
    Posted 5 years ago #

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

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

    Never say Never!

  17. vegthrea
    Member
    Posted 5 years ago #

    @slobizman manage your posts only plug in will only show post author his posts.

    http://code.mincus.com/41/manage-your-posts-only-in-wordpress/

Topic Closed

This topic has been closed to new replies.

About this Topic