The Admin and Super Admin roles are the only ones with access to edit themes. If you’re wanting to give other people all other “Admin” capabilities but not access to edit themes, it’d probably be easiest to add the User Role Editor plugin, duplicate the Admin user with a new title and then just un-check the “edit_themes” capability for that role.
If you want to dig into the code a bit, you could use the ultimate guide to roles and capabilities to hack together a solution.
I’d strongly urge you to NOT hack the WordPress core, as that leaves you SOL the next time they release a new version.
Related Posts:
- Change the Theme in Jupyter Notebook?
- Extra TinyMCE editor strips and tags?
- Disable Visual editor for all users
- Why is the visual editor in WordPress limiting the width by wrapping the content?
- Editor removes tags
- Allow Editors to edit pending posts but not draft ones
- Adding a rich text editor to Excerpt
- Allow user to “edit_others_posts” to save only, not publish
- Avoid converting “>” to >
- Disable WYSIWYG editor only when creating a page
- How to edit posts with the new wp_editor api?
- How can i add some static text above the editor?
- Add quicktag buttons to the HTML editor
- Force TinyMCE editor’s “Toolbar Toggle” to be automatically chosen & expanded
- Stop certain classes showing up in TinyMCE Advanced Style dropdown
- WordPress 4.6 link edit dialog is too rudimentary
- Disable the Code View in the content editor?
- Re Order Editor to be after meta box [duplicate]
- post editor changes & to &
- Disable escaping html
- Allow editors access to added plugins
- Gutenberg block editor – list of form components for custom blocks
- Completely disable editor
- Disable text tab on WordPress text-editor
- How to enable the theme editor cap for an editor role?
- If two users attempt to modify a page, does WordPress still work correctly?
- Restrict access to post if it is currently being edited
- how to make author to write comment on only his own posts?
- What’s the Best Way to Edit WordPress Files?
- Why is WordPress WYSIWYMG and how do I make it WYSIWYG?
- Add visual editor capability to custom excerpt window?
- Allow users to publish child pages of the pages they have access to edit
- Square brackets make WordPress ignore newline/paragraph
- Open posts in editor in the ‘Text’ mode by default
- Text cut off on save
- Restrict backend but allow to use post.php?action=delete&post=POSTID from front-end
- line break are not working when editing a post [closed]
- Making the Post/Page Content Editor Box Bigger?
- Showing only certain buttons on tinymice content editor
- Set default text for the editor in new posts
- How to apply editor filter to posts with a specific custom post type
- How to *disable* the post content editor
- Add option for editors through `register_setting`
- Ajax Redirect role = ‘Editor’ to their Dashboard after register
- Remove all table widths from editor content
- WordPress post editor crashes with Polyfill typo
- How do I fix my ‘Path’ field when editing pages via the Dashboard?
- Define multiple Gutenberg editor widths
- in network setup super admin has the tinyMCE buttons and the regular admin has not
- edit posts through front-end
- Hide everything on site for visitors except specific page IDs
- How to get Text Selection in WordPress Editor
- Float images in content
- Good tutorial on how to make custom write panels in WordPress 3?
- Programmatically allow a non-author to edit a post based custom meta field
- Always paste as a text in visual editor
- Use MarkItUp as editor and not the default
- How to restrict the editors from viewing/editing pages created by admin?
- Editor doesn’t load properly on my self-hosted WordPress 3.3
- Can Rich Text features be configured per user?
- How to add notice text above Post Editor?
- wordpress editor role remove all but ‘menus’ in appearance menu
- Cannot access WordPress Appearance → Editor
- Edit the archive-{custom_page}.php via WP editor
- How to disable YouTube (and any other oembed) embeding in the editor
- Creating table layout in WYSIWYG editor
- Add default text to multiple wysiwyg editors
- Bulk edit contents of pages
- How to leave a line between paragraphs when writing text in the visual or text editor
- Customize Editor Styles
- WYSIWYG eating up first p in td
- How do you set up a WordPress blog with multiple authors to allow something like StackExchange’s “community wiki” feature?
- Protect sequence of pages with same password for each of two groups of users
- problem adding code into wp editor for https://wordpress.org/support [closed]
- Adding content in Gutenberg editor
- How to display full width block without toolbar?
- WordPress editor converted/deleted HTML entities code
- Make nav-menus.php available for editor
- How can I register a custom “Text Pattern” (WP 4.3) for TinyMCE?
- Open ‘View Page’ Button in Editor in new Tab
- Opening Brackets Do Not Format to Paragraphs in Visual Editor
- WordPress editor spacing very unreliable
- wp_editor responsive?
- Making the Content Editor Box Bigger in 2013
- WordPress editor removes all the linefeed characters with WP-Markdown and Syntax Highlighter evolved
- wysiwyg is scrambled
- Why wordpress word count differs from Microsoft word and sites like wordcounter.net
- Is there a plugin that let you edit Posts and Comments in a front-end page?
- WP is not allowing me to post Macintosh .pages documents to my blog
- Intermittant problem saving posts
- How to set default post editor based on role?
- User restricted only show posts assigned to current user
- Give Editor Access to Custom Theme Options
- Visual Editor: Paragraph styles appear to one admin but not to others
- The simplest way to let clients edit pages
- Page/post editor with syntax highlighting [closed]
- Editor is shown at full width
- Hide front-end from every logged out user and redirect them to the default login page
- How do you stop WP from stripping code? [closed]
- Unable to edit and see content of pages