Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

From what I've seen around the code, you can do this by hooking a function on admin_init, do you stuff and then die().

Is there a better way that follows "WP best practices" I'm missing here?

The page should not have any default body content, like the dashboard sidebar, but the admin scripts/CSS should be loaded normally.

share|improve this question
    
when you use die() you can rest assured that is not the proper way –  HungryCoder Jun 18 '12 at 17:07
    
That's why I'm asking for alternatives –  onetrickpony Jun 18 '12 at 17:08
    
Unless the administration page does not have any link in menu, how it will be accessed? if you want to access that page directly (putting URL in the address bar) and you don't want to embed the page inside wp-admin's layout, (i dont know exact way, honestly), i guess you can create a separate php file and include wp-config.php so that you can wp environments. from that page, you can handle the configurations. but its also surely NOT best practice. –  HungryCoder Jun 18 '12 at 17:13
    
you can check this page. here i see some guidelines wordpress.stackexchange.com/questions/1778/… –  HungryCoder Jun 18 '12 at 17:14
1  
add comment

2 Answers

I think you can do a simple trick like this:

  • Create an administration page, just like normally using add_menu hook with default or low priority
  • Hook to admin_menu with higher priority and remove that admin menu item (or you can use a plugin like Hide Admin Menu to do that)

Removing admin menu after creating doesn't block you from accessing that page, it just hide the item in the menu, meaning if other people don't know the page slug (which you can make it unique and hard to guess) they can't access the page.

share|improve this answer
add comment
  • remove all admin menu
  • remove all dashboard widget
  • disable upgrade notification

you'll have blank dashboard and do your stuff

http://www.catswhocode.com/blog/10-wordpress-dashboard-hacks

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.