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).


1 Answer 1


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.

  • 1
    I don't understand why you would vote down an answer that actually works and solves the problem?
    – windyjonas
    Jan 14, 2014 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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