WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a custom settings page that I've positioned in tools > Custom Settings

add_action('admin_init', array('siteSettings', 'register'));
add_action('admin_menu', array('siteSettings', 'menu'));

$page = add_management_page(PLUGIN_NICK.' Plugin Options', PLUGIN_NICK, 'delete_posts', PLUGIN_ID.'_options', array('siteSettings', 'showPage'));

<form action="options.php"

The form posts to options.php (even though I've put it in tools menu), and the editor role gets permission died when trying to update the form, although they can access the form without errors, they just can't save.

I fixed this with

$editor = get_role('editor');

However this gives them menu items; Appearance, Settings, and all other admin menus created by plugins which I don't want (I only want them to be able to access things in Tools which they had before).


share|improve this question

Use the Settings API or hook a function to admin_init that checks permissions and nonces, saves the updated values and redirects to the custom settings page.

share|improve this answer
I don't understand why you would vote down an answer that actually works and solves the problem? – windyjonas Jan 14 '14 at 8:03

Your Answer


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.