Wordpress Dashboard Editor
Posted on Tuesday the 18th of March, 2008 at 3:20 pm in PluginsOf the entire website the Dashboard is seen by administrators the most, but it is the hardest part of Wordpress to customize. Well not anymore. This plugin allows you to add whatever you want to the Dashboard through PHP and HTML and allows you to even add Sidebar Widgets. You may also wipe the entire dashboard or individually remove some of the more irritating sections like the Dev news, Planet Wordpress and the getting started section.
In WordPress 2.5, the code is cleaner, the plugin is more responsive and you can add both “real” sidebar widgets, or add “fake” ones to match the dashboard.
This plugin is currently intended for 2.5, but it also works in Wordpress 2.1 – 2.3 and can work in Wordpress 2.0.x if you use the Completely Wipe Dashboard option.
Installation is a breeze:
- Download the zip file for Wordpress Dashboard Editor
- Unzip and upload dashboard.php to your wp-content/plugins/ folder.
- Go to your dashboard. There will be a new sub-menu item.
- Select any options you want and add any PHP or HTML code that you want to the textbox.
Code Examples:
To add a sidebar widget to your dashboard (after selecting the option from the Dashboard management page) use the code:
<?php dynamic_sidebar('admin');?>
The Admin sidebar is modified and controlled the exact same way as any other sidebar.
If you use the WP-UserOnline plugin you can use:
<?php echo useronline_page();?>
In WordPress 2.1-2.3 f you find that your new content doesn’t align nicely you can add:
<div style="float:left; width:460px;">////Add all other content here//</div>
Any code that can be used in your Wordpress Theme can be used in the dashboard. This means that you can have different information appear for the different user roles among other things.



Very Impressive. My thnx to webmasters.
Reply to MijomnhfThanks alot for this man .. I have been looking ways to get rid of all those developer news & etc…
Reply to RizwanThanks for this plugin
Reply to KeithIt would be nice to be able to limit the number of news items that is displayed rather than having only the option to remove the entire section(s).
Very cool, thank you! Works on my WP 2.2.
Reply to RolandoHi!
First of all: great work! This plugin is indeed very useful!
But I have a question: how can I create a different dashboard for different user levels? e.g. I have links and stuff which should only be read by the admin, how can i prevent a “normal” user from seeing this content?
thanks for your help!
Reply to sorcerersorcerer
This can be done using the user roles and capabilities built into Wordpress.
Basically to determine a user’s level you are going to pick a skill and check if they have it. EG The author level is the lowest level that can upload content.
The code for this is:
- Use the following to copy and paste the code.
Reply to Aaron<?php if(current_user_can('edit_users')){ ?>//// Place code only users who are able to edit_users here.//<?php } ?>First, thank you for your great plug-in!
But I have a question.
So, to make all my subscribers to NOT see “devnews”, “planetnews” and “incoming”, what do I have to add in the php code block?
Could you tell me the exact code to block them?
TIA!
-jay-
Reply to JayThat can all be done with the checkboxes.
Reply to AaronI know the options; but selecting them also affects to admin view. How can I avoid the situation, blocking only non-admins?
TIA,
Reply to JayYou would have to directly edit the dashboard.php file. Unfortunately, I don’t have a copy of the code at hand, so I can’t say for sure, but you will have to add global $current_user; inside the “dasboard_wipe” function and edit each if/else statement and change most of the lines that look like: $dashboard['dashboard_secondary'] || $all == 1 to (!current_user_can('edit_posts') && $dashboard['dashboard_secondary']) || $all == 1
Reply to AaronOkay I have been following your thread to try and achieve the following:
I would like to use the plugin creat a different simple dashboard for my contributors.
So to do so I need to:
Add
//
// Place code only users who are able to edit_users here.
//
But what code do I add here? Also it seems strange to use what a current user can do, surely it should be something they cant do?
Then I need to add:
global $current_user;
to dashboard…but where exactly or does it not matter?
Then replace:
$dashboard['dashboard_secondary'] || $all == 1
with
(!current_user_can(’edit_posts’) && $dashboard['dashboard_secondary'] || $all == 1
Should this then give me what I am looking for in the scenario above?
Thanks for your time
Reply to Saff SamThe current_user_can was for adding content for the admin user. You can prefix this as !current_user_can to check the reverse.
You can add whatever code you want in that block. It is only an example of how to check user permissions.
I’m not sure what the scenario you are looking for is, but yes, it would show a different dashboard to non-admin users.
Reply to AaronGreat Plugin
I was just wondering if there was a way for me to display all my posts’ drafts to the dashboard? It would make writing posts a heck of a lot easier.
Maybe I’m just asking here is what code would I need to add for it to look like the “Manage” unwritten posts section of the admin panel.
Thanks
Reply to James LewitzkeExcellent plug-in, but I somehow managed to break it after adding ‘admin3′, ‘2′ additional sidebars and then put the RSS sidebar widget into the ‘admin’ sidebar with the following error:
Warning: preg_split() expects parameter 3 to be long, string given in wp-content/plugins/wordpress-dashboard-editor/dashboard.php on line 109
Thought it best to tell you…
Reply to NI-LIMITSSame happened to me when upgrading from v2.3.3 to v2.5.
Reply to Martin TeleyHi,
Great plugin but on a couple of my sites it’s broken as above with the message
“Warning: preg_split() [function.preg-split]: Unknown modifier ‘d’ in /home/httpd/site/mysite.org/htdocs/eng/wp-content/plugins/wordpress-dashboard-editor/dashboard.php on line 109″
Help much appreciated.
Jeremy
Reply to Jeremy ClulowHi Mike,
Thanks for that. It did clear the error, but it removed *everything* on the Dashboard *except* my customized menu. No top or bottom menu bars, no nothing. I’ve now replaced version 1.01 with version 0.2 and all is fine again. As I clear the dashboard and only use my own customised menu, 0.2 works fine for me. Must remember not to upgrade!
Jeremy
Reply to Jeremy ClulowAwesome plugin, I use it with great success to point my subscribers in the right direction as far as what I want them to do once they’ve signed up (using wordpress to drive an affiliate building review service).
I’ve got one thing that annoys me about the plugin is the fact that when I add multi-line php into the text editor, it works just fine… until I try to edit again. Once the page loads, it adds it’s own BR tags at the end of every line.
How would I disable this?
Reply to Nathanieli love this plugin, i have it running on several sites, but on one site (which is hosted on a different server) i’m getting the same line 109 error as jeremy, and the suggested fix doesn’t work for me either.
i’d be really chuffed if anyone knows how to resolve this!
thanks
Reply to simonsimon
Simon and Jeremy,
Mike’s code was correct, but WordPress stripped out part of it.
The following code should work correctly.
preg_split('@\<div class=\"wrap\"\>[\S\s]*\<\/div\>\<!-- wrap --\>','',$buffer); Reply to Aaronthanks! that works perfectly
Reply to simonNot working for me.
Reply to A.I.I was able to work around the problem by removing individual components. Wipe all still does not work, even with the code change in 109. Same error as before. At least it works. I am happy! Strangely, it works fine on other WP sites I have. Must be a theme compatibility issue.
Reply to A.I.I’ve uploaded the correct fixed version to the plugins database. Please try upgrading.
Reply to AaronI’m already at 1.1. Is it the same release number? I’m confused about where to get the fixed file. Or is another 1.1 that is fixed?
Reply to A.I.A.I. »
I assumed you weren’t using 1.1. There must be some other problem that isn’t occurring on my setup. I’ll take a look at it.
Reply to AaronThanks, just a reminder. It’s working in one WP site, but not in another, and it’s just the wipe all feature that is having trouble. Thank you for your concern.
Reply to A.I.When I upgraded to 2.5, I no longer am able to see “Dashboard Management” under the Dashboard section. This is for an install where I had DM activated and updated it automatically. Now when I activate it all I see is my custom text, but there is no way to modify or configure anything.
I’ve tried deactivating, deleting, re-installing and re-activating but get the same problem
In an install where I didn’t have DM activated, and activated it after an install, it was OK.
Any ideas?
Reply to SolotempoWorkaround: Go directly to the link!
http://your.url/wp-admin/index.php?page=wordpress-dashboard-editor/dashboard.php Reply to A.I.With the plugin active I’m having the same issue mentioned earlier: I only see my custom menu, no header or footer, and the Warning: preg_split() expects parameter 3 to be long, string given in /home/firesnak/www/www/wp-content/plugins/wordpress-dashboard-editor/dashboard.php on line 109 error.
I had the complete wipe enabled before I upgraded, and when I reactivated the plugin it restored the options. That seems to be where my problem came from.
Reply to M.B.Also, make sure the dashboard.php file is inside the default “wordpress-dashboard-editor” folder.
Reply to MikeGood point. In fact, when it was not in the default install folder, the automatic upgrade failed. So it’s not a good idea to move out into the root plugins folder. Excellent catch.
Reply to A.I.With the automatic upgrade, it seems that most plugins should begin using their own folder.
Reply to AaronCode fix (latest) could not work on mine (WP 2.5.1). However, some WP site works without any modification. So I also guess this caused by theme compatibiliy??
Reply to vyv00411This plugin is one of my favorite. Hoping I can get fix soon.
Hi,
Nice plugin, good work !!
BTW I liked your WP theme, can I download it from your site?
Regards
Raul
Reply to RaulThank you. Unfortunately, no the theme is not currently being distributed.
Reply to AaronYeah, unfortunately I’m getting the same problem with this plugin not working in my new install of WP 2.5.1 – When I click on the dashboard, I see all the new elements I have added to my dashboard, but all of the wordpress navigation links (I mean everything except the dashboard contents) dissapears!
This is a real nice plugin. I hope I can get it working on the new WP soon.
Reply to JinxedOrchidI’m so happy I discovered this plugin – thanks a lot!
Reply to chrisI think the preg_split() call on line 109 is broken. Looks to me like it should be:
$parts = preg_split('@\[\S\s]*\\<!-- wrap --\>-->@',$buffer);Note the assignment to the variable $part and the omission of the troubling 2nd parameter.
cheers,
Reply to b1b1
WP 2.5.1 – Dashboard Editor 1.1 – Bug: “Remove recent comments” checkbox is not persistent
“Remove recent comments” checkbox is not persistent (at least on my install).
Reply to Lionel CholletAny time you come back and edit things in the Dashboard management panel, you have to check the “Remove recent comments” again. That can be pretty annoying for a site that doesn’t allow comments, but whose administrator is often tweaking the Dashboard, thanks (a lot) to WordPress Dashboard Editorв?¦
WordPress ate my code! Here’s another tryв?¦
WP 2.5.1 – Dashboard Editor 1.1 – Tip: Customize your custom widget’s title
Maybe there’s a more straightforward and obvious way to do so, but I haven’t found it, so here’s my tip:
1. Open the file “dashboard.php” located inside the “wordpress-dashboard-editor” folder in a text editor.
2. Go to line #155 and replace
<h3 class=”dashboard-widget-title”>
with
<h3 class=”dashboard-widget-title” style=”margin: -38px 0 0 0;”>
3. Save your change.
4. At the beginning of the custom widget text area in the Dashboard Management panel, write:
<h3 class=”dashboard-widget-title” style=”margin: 0 -15px 0 -15px;”><span>YOUR_CUSTOM_TITLE</span><br class=”clear”/></h3>
5. Save your change.
6. Enjoy!
Reply to Lionel CholletThe error with preg_split() call on line 109 is corrected by replacing with:
$parts = preg_split(’@[Ss]*\@’,$buffer);
Reply to Michael CollierComment form strips div tags.
$parts = preg_split('@\[\S\s]*\\<!-- wrap --\>@',$buffer);–>
Reply to fredThe form strips some of the code so I have added an screenshot.
Reply to Michael CollierI was pretty psyched about this plugin, but unfortunately the dynamic dashboard widgets aspect of it is unusable. It looks like the plugin is trying to do some “magic” reformatting, and it’s not turning out pretty. One thing it seems to be doing consistently is adding <p>…</p> around the php code for the dynamic sidebar, but this is not good either.
Also, it seems to ignore my custom “title” text, showing Dashboard Editor Widget 1 instead, always.
So then I disabled the “Use Sidebar Widgets” option, to turn it off… and the box labeled Dashboard Editor Widget 1 does not go away. It’s empty, but it should be gone! Even deactivating and re-activating the widget doesn’t clear this condition. My only choice (unless I want to dink around in the database to delete the stuff this plugin left there) is to deactivate this plugin and forget it forever. Srsly, you should have a “clean uninstall” action for this plugin. And you’re asking for donations for this? I’ve seen plenty of plugins that are a lot more robust than this one, and their authors aren’t asking for money.
The other aspect of the plugin – disabling parts of the dashboard – seems to be working OK.
Reply to jdpI’m using WP 2.5.1.
hi,
thnx a lot for this wonderful plugin.
i want a tip if available:
can i show related different sidebar widget title in place of default “dashboad editor widget 1,2 etc.”?
if possible, how??
thnx again dude..
Reply to zihadhi,
i want to do another thing.
i want to make “You have…” section visible only to the administrators but not to users of other levels.
can u plz provide the code for doing this??
thnx.
Reply to zihadGreat, easy clean up of the dashboard, I was able to get rid of all the unnecessary wordpress news for one of my clients.
THanks
Reply to Santi SosaIs is possible to remove a widget once it has been created? I was playing around with the plugin on a test site, but I seem to be unable to get rid “fake widget”.
Reply to seanExcellent plugin, just what I’ve been looking for.
However, I would love to get this customised for my site. I’ve read above how to do certain things like allowing subscribers to see certain widgets where as allowing say contributors to see different ones.
The problem is have very limited time and need this to be done for me…
Anyone with good knowledge of this plugin / wordpress /coding (most preferably the developers here if you have time)… please get in touch with me if you can customise this plugin for me.
Subscribers can see:
- Latest posts
- Most popular posts
- Latest comments
Contributors/Editors/Authors can see as above plus:
- Posts awaiting approval
- Latest Links (feed from Link Directory plugin)
- Links awaiting approval
Plus a few other things need modifying. Of course there will be a payment for all this work – but we can discuss that via msn/email etc.
Contact me please : unrotten (at) gmail.com
Thanks
Reply to WixarI accidentally enabled the complete wipe feature. Now I can’t see anything, so I haven’t been able to restore to the normal dashboard.
How do I recover from a complete wipe? Thanks.
Reply to binksFor those looking to reorder their dashboard widgets and such, try this plugin. It’s much easier to use and the only downside I see for most uses is that you can’t edit the “You have” and “You are” sections.
Reply to Alex McGI don’t get how to do this at all. I just want to add a weight tracker to my blog. This says to upload the .zip file but it says the file isn’t found when I try to save it to my computer when downloading. Where am I supposed to save it TO before uploading? It seems like a pain. Isn’t there an easy way to get a weight tracker from tickerfactory.com onto my blog???
Reply to khoorayThanks
khooray
Reply to I_hate_whinersYes, khooray, there is an easy way.
Now quit your effing whining. Maybe someone else will feel like answering you then.
Hi, firstly, thanks for an absolutely wonderful plugin. I’m on 2.6 and it’s working like a charm.
This is a really basic question and I’m sorry to ask, but I’ve tried to find an answer but to no avail. When I utilise the space which says “The following code will be added inside the wordpress widget section as a widget.” and add some valid markup in there, a lovely little box is displayed on my dashboard as expected. However, the ‘widget’ has a title of “Dashboard Editor Widget 1″ and I was wondering how I would be able to adjust this title or remove it completely?
I’ve never really utilised ‘widgets’ before – I guess I’m stuck in the stone age. Any light you can throw on the matter is greatly appreciated.
Thanks very much in advance, when I get my PayPal account sorted I’ll buy you a coffee
Reply to Richard TapeRichard
There is also a small little bug that is nothing more than a slight annoyance. When I click on the “Remove Recent Comments” select box then save settings, it doesn’t save the setting for that particular widget. Strangely, the widget vanishes from the dashboard, but thr setting isn’t maintained. This only becomes slightly annoying when you make another change in the dashboard editor and click save as the Recent Comment widget reappears and you then have to go back into the dashboard editor to get rid of it again.
Just thought I’d give you the heads up as I imagine that’s a very simple fix.
Thanks again,
Richard
Reply to Richard TapeThanks for the great plugin!
I’m trying to ‘hack’ your plugin a bit, so that I can have different pages for different user-levels.
I have the user levels working, and they can have there own custom profile page, but my real problem is that I don’t know what action to associate a new form with.
ie. I wipe the dashboard page, and have a custom form placed on the page instead, so that I can process a users details directly. In the form, I can set an action (either as a form action, or as a hidden input type, as you use). If I use a form action, it’s looking for a page/permalink if I use a hidden input form, the POST variable isn’t getting set…. soooo ….
How do I redirect a form back to a function in the dashboard.php pluginfile (or any other file for that matter)?
Matt
Reply to Matthew KettlewellHi, I installed this plugin, and it works great for the dashboard, but broke my login/register/logout interface. Any time I try to log out, I get a bunch of errors. When someone new tries to register, they get the same errors, and when a returning user tries to log in, they get the same errors. The errors are as follows:
Warning: Cannot modify header information – headers already sent by (output started at /var/www/wp-content/plugins/wordpress-dashboard-editor-dashboard.php:1) in /var/www/wp-login.php on line 267.
It continues to list the error several more times on lines 279, 610, 611, 612, 613, 614, 615, 618, 619, 620, 621, 624, 625, 626, 627 and 770. Can any one help me get this fixed?
As well, has any one else had this problem? I am running the Register Plus (version 3.5.1) plugin at the same time. Could that cause a conflict?
Reply to Jason@Jason
Yes, similar problem experienced here. Login/Logout is broken, but it’s just a white screen that goes nowhere. I also have RegisterPlus running, so it sounds like there may be a conflict there.
Very nice plug-in though.
Reply to PaulI am missing something simple. I’m using WP 2.6.2. There are two editor windows on the dashboard, the top one says “The following code will be added before the wordpress widget section. (works in 2.3)” and the bottom one says “The following code will be added inside the wordpress widget section as a widget.” The top one doesn’t seem to do anything and when I use any of the editor buttons the code is inserted in the bottom editor.
So what is the top editor for or is it only for version 2.3?
Thanks
Reply to EvanHi
Are you planning to release a WordPress 2.7 compatible version?
I know that 2.7 has the ’screen options’ tab now, but I hide this from my users and I’d like to be able to set the default widgets that display on the dashboard.
Many thanks
Reply to SimonSimon
Dashboard editor is great, would love to see a 2.7 compatible version.
Reply to SteveHow do you hide the ‘Screen Options’ tab from users in WP2.7? I’ve been trying to figure out how to do that.
I’d also like to see Dashboard Editor plugin available for Wordpress 2.7.
Reply to sgGreat idea, just wish it worked with recent WP versions. :-/
Any news for a 2.7 compatible version? Or anybody have ideas on how to customize a 2.7 dash? This is important for all the reasons this article explains.
Thanks!
Reply to Richard Harrisbtw, looks like the stylesheet for this site is harped. Not loading for me at least. Page looks a bit strange without styling.
Reply to Richard HarrisHello, thanks for the plug-in … it’s very usefull, but i’ve enabled the complete wipe and now i can’t go back…
Please help !
I’ve desinstall, and reinstall the plugin, but i still can’t access to dashboard ..
PS: excuse my bad english, i hope someone understand my question …
Reply to vlHello,
I’m trying to use your plugin but I can’t seem to be able to save any of the options I choose. It just reverts back to default options everytime, I tried cleaning my browser’s cache and nothing, happens with IE and Firefox. Also I’ve placed the awp tags on my index file and when I chose the option so that it doesn’t add them automatically the plugin ceased to work. I enabled them again took a peak at the source code and there were two tags right next to each other, mine and the ones added by the program. Where are the plugins configs saved to? I tried searching the database but there’s no entry there so it must be some local file, do I need to chmod anything? Some people were saying the plugin didn’t work with the new version of wordpress so I downgraded it but still couldn’t get it to work. Waiting for suggestions, thnx! You can take a look at the website through the link on my post if you can, ty.
Reply to MACCI’m on 2.7.1 and have the same problem as the person above. I suppose it’s because of the version level. Hope it’s updated.
Reply to Linda CarterAnother +1 for compatibility with 2.7
This is exactly what I’m looking for – only it doesn’t work atm
Reply to Ben BIs this going to be updated for 2.7?
Or does anyone have an alternative?
Cheers
Reply to MIkeДобрый день, уважаемые форумчаны!
Рады сообщить что создан новый сайт, цель которого предупредить людей которые
устраиваются на новую работу, о кидалове. Надеюсь что общими усилиями,
мы создадим обширную базу данных, которая может помочь привлечь нерадивых
работодателей к ответсвенности.
Если вас когда нибудь кидали на работе, потратьте пару минут вашего времени,
быть может кто-то из ваших друзей устраивается на ваше место!!
С уважением, администрация сайта http://www.cnd.su
Reply to antijobIt doesn’t work with Wordpress 2.7.
Is this going to be updated?
Thanks!
Reply to Deventerwhat a goddess!!,
Reply to Fourvillehtml kod kralД± mvg site html kod kralД±
html kod kralД± mvg site html kod kralД±
html kod kralД± mvg site html kod kralД±
Reply to mvgsitehtml kod kralД± mvg site html kod kralД±
Reply to mvgsiteWas looking for something like this but it does not appear to work for WP version 2.8.4 – installed fine but the ’save’ button does not appear in the admin area so unable to use it. Hope there will be a fix/update soon!
Reply to GigGuideAnyone an update yet ?
2.8.4 is not compatible with this plugin.(or vice versa)
Reply to CinqJust wanted to let you know that the plugin doesn’t seem to work in the newer versions of wordpress. If ya have time maybe could ya update the plugin?
Reply to BrianUsing WP 2.8. Doesn’t seem to work. no matter what I check, it makes no change on my dashboard.
Reply to Emily GarmanHi – I am interested in next
I want to remove some features and statistics for all below status of administrator – Simply – I think that stuff can be annoying, and not only that – I don’t want anybody look at some things. Beside me and few others some data, features and similar will not be available to all – but by “status” of people on a blog
Is it possible with this by simple checking who will see what?
Thanks in advance
Spel
Reply to SpelMany thanks for this. I’ve been using WP for a couple of years now and the number of items on the dashboard that are irrelevant to me has always annoyed me, I’m just surprised I didn’t find this plugin earlier
Reply to Jamesvery good article. i like it.
Reply to anikaGreat plugin !!! THANX A LOT !!
Reply to Antiche RiproduzioniI guess you abandoned this project considering that it doesn’t work worth a crap in 3.0…
Reply to John Martini installed your plug in and didnt realize it was outdated and now my dashboard is completely dysfunctional. i cant rearrange anything and “incoming links”, “plugins”, “quickpress”, “wordpress blog”, and “other wordpress news” never load in.
Reply to Caiti