Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.1   Updated Monday, July 6th, 2009 at 7:19pm

Hide Admin Panel from Subscribers Plugin for WordPress

This plugin prevents subscribers from viewing the WordPress admin panel located at /wp-admin/. They are instead shown a custom message that you specify, as well as an optional logout link. You can use HTML tags and CSS in your message to style it any way you choose. Logged in users who have more access than subscribers are shown the standard admin panel.

Download

  If you have found this page useful, please consider donating. Thanks!

Change Log

  • 07-09-09 Version 1.1 – Fixed issue with logging out on newer WP versions. Fixed output of custom messages with the stripslashes function.
  • 08-20-08 Version 1.0 – First release.

Installing

  • Download the above file, rename it from .txt to .php, and upload it to your plugins directory.
  • Enable the plugin.
  • View the plugin’s options page (under Settings -> DDHideAdmin) to configure your message.

Notes

If you would like to provide a logout link on the page, simply place the word LOGOUT where you would like it to appear (this keyword is case-sensitive) and the link will be generated.

  1. plugin works fine! Thank you!

  2. Plugin works with me. Thanks

  3. I have installed this plugin and it works fine, but I need something to replace the login required for users to comment on individual posts. I hope that makes sense. Do you have a version that takes care of that? Thanks.

  4. hello -this is a test

  5. the plugin works just fine! thanks again!

  6. Version 1.1 Released

    This updated fixes an issue with newer versions of WordPress (the log out link is generated in a different way).

    The output of custom messages has also been fixed by applying stripslashes to the variable.

    This version has been tested in the latest release of WordPress – 2.8

  7. Hi, I installed and activated the plugin. When I added HTML and CSS to the messagebox to display to the user, it did not output correctly. But the problem was solved by replacing line 100 with this code:
    Before “echo $ddhap_message;”
    After “echo stripslashes($ddhap_message);”

    Instead of display Logout link, I use HTML to redirect to blog home page. Here is a link to HTML redirecting code:
    http://www.instant-web-site-tools.com/html-redirect.html
    Hope it’s helpful :D

  8. My WordPress is 2.7.1

  9. After activating the plugin, there is no problem with Admin account. I tried to login with Subscribers account, and I got a message “You are attempting to log out of Job Board” (Job Board is my site title) with link “Please try again” below the message. The link was point to “wp-admin” directory. So how can I fix this problem?

  10. When I activate this plug-in it logs me out as well! How do I get back to the dashboard?! I have to delete the plug-in, it doesn’t seem to work for me. There is no way of even getting to a log-in screen as the admin. I don’t get it?!

  11. 5
    irish

    plugin works fine

  12. Yes, that is the purpose of this plugin. To completely block the admin panel from subscribers. It is not for everyone of course, but useful in certain situations.

  13. Have you tested this plugin at all?

    The subscriber is presented with a dead end, with no easy way to get out of it. When I added hyperlinks to direct them back, they end up on a 404 error not found page.

    In addition, they cannot edit their profile which is a real bummer.

  14. The link is fixed

  15. Error 404
    Sorry, we could not find what you were looking for, but don’t give up hope! It is probably still around here somewhere. You can use the search box to the left, or take a look at the links below.

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.