Plugin: Remove the WordPress Dashboard

by filosofo. Posted on May 24, 2006 at 11:44 pm

On my way to doing something else, I came up with this plugin that removes the Dashboard from the admin control panel. Note that the GPL license is longer than the actual plugin. :)



<?php
/*
Plugin Name: Filosofo Remove Dashboard
Plugin URI: http://www.ilfilosofo.com/blog/
Description: Make the Dashboard, that page that takes forever to load when you log in, disappear.
Version: 1.0
Author: Austin Matzko
Author URI: http://www.ilfilosofo.com/blog/
*/


/*  Copyright 2006  Austin Matzko  (email : if.website at gmail.com)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/


function remove_the_dashboard () {
global $menu, $submenu, $user_ID;
        $the_user = new WP_User($user_ID);
        reset($menu); $page = key($menu);
        while ((__('Dashboard') != $menu[$page][0]) && next($menu))
                $page = key($menu);
        if (__('Dashboard') == $menu[$page][0]) unset($menu[$page]);
        reset($menu); $page = key($menu);
        while (!$the_user->has_cap($menu[$page][1]) && next($menu))
                $page = key($menu);
        if (preg_match('#wp-admin/?(index.php)?$#',$_SERVER['REQUEST_URI']) && ('index.php' != $menu[$page][2]))
                wp_redirect(get_option('siteurl') . '/wp-admin/' . $menu[$page][2]);
}
add_action('admin_menu', 'remove_the_dashboard');
?>

 

3 Trackbacks/Pingbacks

  1. [...] I was looking for a plug-in to make that pesky “Dashboard” tab on Wordpress disappear, and I finally found it here. [...]

  2. [...] Dashboard If you don’t like all the feeds, this no-hack dashboard plugin removes them and this plugin code completely removes the dashboard page, so you can always go to the Write Post page. Other [...]

  3. [...] finally, I’m using the Dashboard Remover plugin to get rid of that annoying dashboard (and to prevent registered users from seeing that [...]

26 Comments

  1. Jesse commented on May 25, 2006 at 12:44 pm | Permalink
    Jesse

    What would be the use of this plugin? Isn’t the purpose of the dashboard to be helpful in administering your blog[s]?

  2. filosofo commented on May 25, 2006 at 1:08 pm | Permalink
    filosofo

    There are two reasons this plugin might be helpful to someone:

    1) The Dashboard often takes a long time to load when you login, as it polls the feeds for the developers’ blogs.

    2) Someone might want to trim WordPress down for a more professional purpose; the Dashboard is odd in a small company’s CMS, for example.

  3. filosofo commented on May 25, 2006 at 1:10 pm | Permalink
    filosofo

    Or are you thinking “Dashboard” means the entire admin control panel? I mean just that tab all the way on the left, which you see when you first log in.

  4. Jesse commented on May 25, 2006 at 8:09 pm | Permalink
    Jesse

    I was thinking the term dashboard referred to the entire screen at initial login - with the ‘Latest Activities’, ‘Comments’, ‘Blog Stats’, etc. With this plugin, what would appear in that place? Would it be the same without the rss feeds at the bottom..?

  5. filosofo commented on May 25, 2006 at 8:32 pm | Permalink
    filosofo

    Yeah, that’s the dashboard. Some people don’t like it (I just ignore it). With the plugin activated, it just disappears, and when you log in you go to whatever page is to the right of it (it depends on what user level you are).

  6. kei commented on June 4, 2006 at 10:16 pm | Permalink
    kei

    hey there,
    I’m interested in using this ‘plugin’ but I dont know what I should do.
    Could you give me a noobs tutorial?

  7. filosofo commented on June 4, 2006 at 10:19 pm | Permalink
    filosofo

    Just copy the code and past it into a file that ends with “php” (like remove-dashboard.php), put it in your wp-content/plugins/ directory, and activate it under “Plugins” in the admin control panel.

  8. filosofo commented on June 4, 2006 at 10:24 pm | Permalink
    filosofo

    Forgot to mention: make sure there’s no space before the first characters or the last characters in the file, because then you’ll get error messages.

  9. Maria commented on July 28, 2006 at 1:11 am | Permalink
    Maria

    Great stuff. The other day, I was just thinking, “Oh, this slow load Dashboard thing has to go! But how, how, how?”. Thanks.

  10. Angelo commented on December 21, 2006 at 11:39 am | Permalink
    Angelo

    So which version of WP is this for?

  11. filosofo commented on December 21, 2006 at 11:59 am | Permalink
    filosofo

    2.0 and newer.

  12. John Doe commented on January 24, 2007 at 5:00 pm | Permalink
    John Doe

    hmmmm, i downloaded this plugin and it works terrific on WordPress Mu, great job Filosofo!!!

    Now, I might be greedy on this, but do you know or have a plugin that I can remove individual subpages? For example in the Manage page, I want to remove Export.

    It would be greatly appreciated if you can share some info. Thanks

  13. Nyomi commented on January 28, 2007 at 1:00 pm | Permalink
    Nyomi

    I love this idea, but is it possible you could offer a variation of this code that will hide the Dashboard for everyone except Admins, or everyone except Admins and Editors? Ideally there would be an Options page to choose which user levels to hide it from.

  14. Jeremy Clulow commented on January 31, 2007 at 3:58 pm | Permalink
    Jeremy Clulow

    Great Plugin. Thank you. It skips the Dashboard and takes me to the

    wp-admin/post-new.php page.

    Can it be configured to go straight to the

    wp-admin/edit-pages.php

    page?

    Thanks, Jeremy

  15. Jen Simmons commented on February 14, 2007 at 12:21 pm | Permalink
    Jen Simmons

    THANKS!

    I use Wordpress for some of my client’s sites, and then I teach them how to use it so they can update their own pages. The process is already overwhelming enough, and that dashboard page pushes some people over the edge. I tell them not to look at it, but making it just go away is much better! A lot of what’s on the dashboard is helpful — but all the “Wordpress Development Blog” and “Other Wordpress News” stuff is just too too much. (And why is it relevant for people who don’t have privileges to change the theme or install new versions of the software?) I wish that content would only show up for adminstrators, but until that happens, this plug-in with be my fix.

  16. Peter commented on April 22, 2007 at 4:33 pm | Permalink
    Peter

    I second Nyomi on the #13 comment.

    Great plugin, thanks.

  17. Amir commented on June 19, 2007 at 6:36 am | Permalink
    Amir

    Simple and cool plugin but I agree with Nyomi and Peter, it would be great to hide the Dashboard for everyone except Admins, or everyone except Admins and Editors, based on user level. Thx Filosofo !

  18. Outis commented on September 5, 2007 at 12:15 pm | Permalink
    Outis

    Outstanding plugin. I hate the Dash, and had resorted to a drastic hack - just ripping a chunk out of the base php files. This is much neater. Thanks.

  19. billy commented on September 8, 2007 at 6:22 pm | Permalink
    billy

    I keep the dashboard but edited its content so that it does not have any of the WP news and other BS - I also added my own custom links..why bother with a plugin?

  20. Larry commented on September 10, 2007 at 5:31 pm | Permalink
    Larry

    FANtastic plugin!!! THANKS!!!!

    If you do intend to continue development of the the plugin, I also vote for having the option of which page to start from.

    Thanks again!

  21. Kraig commented on November 15, 2007 at 8:43 am | Permalink
    Kraig

    Is there any plugin that can customize menu but not only the dashboard?

  22. Matthew commented on December 10, 2007 at 1:44 pm | Permalink
    Matthew

    Anyone who wants to be able to show dashboard for the admin only, here is the solution:

    [php]
    < ?php
    /*
    Plugin Name: Filosofo Remove Dashboard
    Plugin URI: http://www.ilfilosofo.com/blog/
    Description: Make the Dashboard, that page that takes forever to load when you log in, disappear.
    Version: 1.0
    Author: Austin Matzko
    Author URI: http://www.ilfilosofo.com/blog/
    */

    /* Copyright 2006 Austin Matzko (email : if.website at gmail.com)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    */

    function remove_the_dashboard () {
    global $user_level;
    global $menu, $submenu, $user_ID;
    $the_user = new WP_User($user_ID);

    if ($user_level > 9){
    }

    else {

    reset($menu); $page = key($menu);
    while ((__(’Dashboard’) != $menu[$page][0]) && next($menu))
    $page = key($menu);
    if (__(’Dashboard’) == $menu[$page][0]) unset($menu[$page]);
    reset($menu); $page = key($menu);
    while (!$the_user->has_cap($menu[$page][1]) && next($menu))
    $page = key($menu);
    if (preg_match(’#wp-admin/?(index.php)?$#’,$_SERVER['REQUEST_URI']) && (’index.php’ != $menu[$page][2]))
    wp_redirect(get_option(’siteurl’) . ‘/wp-admin/’ . $menu[$page][2]);
    }

    }

    add_action(’admin_menu’, ‘remove_the_dashboard’);

    ?>

    [/php]

  23. Matthew commented on December 10, 2007 at 1:45 pm | Permalink
    Matthew

    It looks like when I pasted it it screwded up the single quotes. Just replace all of the single quotes in that code with new single quotes, should work fine.

  24. Bryan commented on December 23, 2007 at 1:07 pm | Permalink
    Bryan

    I noticed when using this plugin that it kills the javascript used in 2.3.1 to add additional fields, etc. Is anyone else having this issue?

  25. Martin commented on January 24, 2008 at 2:00 am | Permalink
    Martin

    I attempted to use your plugin to remove the dashboard; unfortunately I must have done something wrong as I am unable to log into the site now.

    I recieve the following message.

    Warning: Unexpected character in input: ‘\’ (ASCII=92) state=1 in /nfs/cust/6/52/41/714256/web/wordpress/wp-content/plugins/remove_dashboard.php on line 2

    Warning: Unexpected character in input: ‘\’ (ASCII=92) state=1 in /nfs/cust/6/52/41/714256/web/wordpress/wp-content/plugins/remove_dashboard.php on line 2
    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\sb100\sa100\f0\fs24 \par \pard\f1\fs20\par }
    Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/6/52/41/714256/web/wordpress/wp-content/plugins/remove_dashboard.php:2) in /nfs/cust/6/52/41/714256/web/wordpress/wp-login.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /nfs/cust/6/52/41/714256/web/wordpress/wp-content/plugins/remove_dashboard.php:2) in /nfs/cust/6/52/41/714256/web/wordpress/wp-login.php on line 24

    Any idea on how to correct this???

    Thanks,

    Martin

  26. Increase Search Rank commented on March 18, 2008 at 8:07 pm | Permalink
    Increase Search Rank

    Find this line in wp-admin/menu.php:
    $menu[0] = array(__(’Dashboard’), ‘read’, ‘index.php’);

    Change the 0 to a number between 1 and 10, then the tab will disappear.

    Personally, I just edited wp-admin/index.php at the very bottom to look like this (commented out the feeds, etc.) and now the dashboard is very clean and helpful. Here is the bottom of the index.php file after changes.

    So the first part above is for the menu tab, the second part is for modifying the dashboard. I like the dashboard menu item, but after I cleaned it up using the comments to kill the busy features.

    Good luck and make sure you back up first!

    —-BEGIN—-

    <!– <?php _e(”Need help with WordPress? Please see our documentation or visit the support forums.”); ?> –>

    I can’t post the actual code, but look for the lines below at the bottom of the file and comment them out as I have done in the line above. That will clean you all up and present a very simple and useful dashboard.

    devnews

    planetnews

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

Subscribe without commenting.

Comment moderation is enabled. Your comment may take some time to appear.