WordPress.org

Ready to get started?Download WordPress

Forums

Invisible Dashboard (11 posts)

  1. Todaro
    Member
    Posted 7 years ago #

    Dear experts,

    I'd like to turn Dashboard invisible to registered users of my blog. Is there a way to do that?

    Thanks in advance.

  2. Todaro
    Member
    Posted 7 years ago #

    Well, let me try again:

    I've found out that the page index.php in the wp-admin folder contains the following code in the bottom:

    <?php _e("Need help with WordPress? Please see our
    <a href='http://codex.wordpress.org/'>documentation</a>
    or visit the <a href='http://wordpress.org/support/'>support
    forums</a>."); ?>
    
    <div id="devnews"></div>
    
    <div id="planetnews"></div>
    
    <div style="clear: both">&nbsp;
    <br clear="all" />
    </div>
    </div>
    
    <?php
    require('./admin-footer.php');
    ?>

    I want it to be shown only if the user is an Administrator.

    How can I do that?

    Thanks!

  3. Todaro
    Member
    Posted 7 years ago #

    C'mon guys!

    I'm not a PHP guy but I'm sure it's not that difficult!

    Consider this:

    When an user other than an Administrator enters the site what does he/she see? Profile and Dashboard only. In other words, all Administrator's options are hidden.

    The question is simple: how can I add Dashboard to those hidden options?

    Thank you to anyone who feels like willing to help me.

  4. Chris_K
    Member
    Posted 7 years ago #

    I found this plugin from a quick search in the forums: http://www.thedailyblitz.org/2006/04/18/weasels-login-redirect-text-replacement-plugin

    Would it help?

  5. Todaro
    Member
    Posted 7 years ago #

    Unfortunately not.

    Surely it's an interesting plugin and I'll keep it set active but it still doesn't do what I want.

    Whatever the redirected page is, it still shows the Dashboard option. That's precisely what I don't want it to do.

    Thanks for your attention.

    Anyone have other suggestion?

  6. Todaro
    Member
    Posted 7 years ago #

    Retrying:

    When an user other than an Administrator enters a WordPress-made site what does he/she see? Profile and Dashboard only. In other words, all Administrator's options are hidden. How can I add Dashboard to those hidden options?

    Thank you to anyone who feels like willing to help me.

  7. Blaize
    Member
    Posted 7 years ago #

    Ok, I had the same question and after extensive searching I came up with ...

    Hide dashboard Plugin

    I've installed it and it seems to work just fine. :)

    Hope it helps.

  8. Alkorr
    Member
    Posted 6 years ago #

    I'm looking for the same thing but Hide dashboard Plugin has a big issue since any suscriber can manually access the dashboard by typing index.php in the location bar...

    Any suggestion? Maybe there is a way to edit a PHP file and remove the Dashboard access for level 0 users. I dunno.

  9. pftq
    Member
    Posted 6 years ago #

    Ran into this same question myself. Did some digging through the files and I decided just to do a flatout edit of the one of the files.

    You may have to redo this every time an update comes along - but ah well. I'm not familiar with how WordPress handles plugins - if someone can do so, that'd be great.

    Just go to your blog/wp-admin/index.php

    Right under:
    require_once('admin.php');

    Put:
    if (!current_user_can('level_10') ) wp_redirect("profile.php");

    Yea, it's a very tiny edit. :P

  10. Alkorr
    Member
    Posted 6 years ago #

    Thx pftq it looks like a good solution and I modified the admin.php file like you said. But when a user (level 10) is connected, he can still manually access the dashboard by typing index.php in the location bar... Any idea how I could definitely avoid them to access the dashboard?

  11. chrisurban
    Member
    Posted 6 years ago #

    Alkorr and pftq are on the right track - what I've done is add this around the block of code from todaro above, in wp-admin/index.php:

    <?php if ( current_user_can('level_10') ) : ?>

    <p><?php _e("Need help with WordPress? Please see our <a href='http://codex.wordpress.org/'>documentation</a> or visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p>
    
    <div id="devnews"></div>
    
    <div id="planetnews"></div>

    <?php endif; ?>

    `

    I think this is a good solution as regular users will still see the zeitgeist block and link to their profile, and admin(s) will continue to view the wordpress news feeds.

Topic Closed

This topic has been closed to new replies.

About this Topic