0

How does one remove the custom theme admin panel from a theme that has the options to change colours, layouts, etc?

Thanks. K

1

The three easiest options:

  1. Limit users' user role to Author or below
  2. Change the $cap parameter from 'edit_theme_options' to 'edit_options' in the add_theme_page() call that adds the settings page
  3. Remove the settings page entirely, by removing the callback that adds the settings page. e.g. if the Theme uses:

    function theme_slug_add_settings_page() {
        add_theme_page( $args );
    }
    add_action( 'admin_menu', 'theme_slug_add_settings_page' );
    

    Then you would remove that via:

    remove_action( 'admin_menu', 'theme_slug_add_settings_page' );
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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