<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>

		<title>Remove the Customizer Function from Admin Menu for Editor Roles &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/feed/</link>
		<description></description>
		<lastBuildDate>Mon, 03 Nov 2025 07:55:24 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135487</guid>
					<title><![CDATA[Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135487</link>
					<pubDate>Thu, 30 Oct 2014 22:56:52 +0000</pubDate>
					<dc:creator>T R</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,<br />
Is there a way to remove the &#8216;Customizer&#8217; from different roles? Particularly the Editor Role? I&#8217;m using the following php script and &#8220;Customizer&#8221; is being included and I&#8217;d rather it is not included to prevent the client from &#8216;messing&#8217; around in there but still have access to the widgets and menu. How can I remove the access to Customizer?</p>
<p>&lt;?php</p>
<p>/*<br />
 * Appearance permissions: edit Appearance menu for selected roles<br />
 *<br />
 */</p>
<p>class AppearancePermissions {</p>
<p>    // roles to which allow the Appearance menu<br />
    private $allowed_roles = array(&#8216;editor&#8217;);<br />
    // allowed items from Appearance menu<br />
    private $allowed_items = array(<br />
        &#8216;widgets.php&#8217;,<br />
        &#8216;nav-menus.php&#8217;<br />
    );<br />
    // capabilities required by WordPress to access to the menu items above<br />
    private $required_capabilities = array(<br />
      &#8216;edit_theme_options&#8217;<br />
    );</p>
<p>    private $prohibited_items = array();</p>
<p>    public function __construct() {</p>
<p>        add_filter(&#8216;user_has_cap&#8217;, array($this, &#8216;add_required_caps&#8217;), 10, 4);<br />
        add_action(&#8216;admin_head&#8217;, array($this, &#8216;remove_appearance_menu_items&#8217;), 10);<br />
        add_action(&#8216;admin_head&#8217;, array($this, &#8216;appearance_redirect&#8217;), 10);<br />
        add_action(&#8216;wp_head&#8217;, array($this, &#8216;hide_admin_bar&#8217;));<br />
    }</p>
<p>    protected function user_has_allowed_role($user) {<br />
        foreach($user-&gt;roles as $role) {<br />
            if (in_array($role, $this-&gt;allowed_roles)) {<br />
                return true;<br />
            }<br />
        }</p>
<p>        return false;<br />
    }<br />
    // end of user_has_allowed_role()</p>
<p>    public function add_required_caps($allcaps, $caps, $args, $user) {<br />
        if (!$this-&gt;user_has_allowed_role($user)) {<br />
            return $allcaps;<br />
        }</p>
<p>        remove_filter(&#8216;user_has_cap&#8217;, array($this, &#8216;add_required_caps&#8217;), 10, 4);<br />
        foreach($this-&gt;required_capabilities as $cap) {<br />
            if (!$user-&gt;has_cap($cap)) {<br />
                $allcaps[$cap] = true;<br />
            }<br />
        }<br />
        add_filter(&#8216;user_has_cap&#8217;, array($this, &#8216;add_required_caps&#8217;), 10, 4);</p>
<p>        return $allcaps;<br />
    }<br />
    // end of add_required_capabilities()</p>
<p>    /**<br />
     * Hide admin front-end menu<br />
     */<br />
    public function hide_admin_bar() {<br />
        global $current_user;<br />
        if ($this-&gt;user_has_allowed_role($current_user)) {<br />
            // block front end admin menu bar<br />
            show_admin_bar(false);<br />
        }<br />
    }<br />
    // end of hide_admin_bar()</p>
<p>    public function remove_appearance_menu_items() {<br />
      global $current_user, $submenu;</p>
<p>      if (!$this-&gt;user_has_allowed_role($current_user)) {<br />
          return;<br />
      }     </p>
<p>      if (!isset($submenu[&#8216;themes.php&#8217;])) {<br />
          return;<br />
      }<br />
      // remove not allowed menu items<br />
      foreach($submenu[&#8216;themes.php&#8217;] as $key=&gt;$item) {<br />
          if (!in_array($item[2], $this-&gt;allowed_items)) {<br />
              $this-&gt;prohibited_items[] = $item[2];<br />
              unset($submenu[&#8216;themes.php&#8217;][$key]);<br />
          }<br />
      }<br />
    }<br />
    // end of remove_appearance_menu_items()</p>
<p>    public function appearance_redirect() {<br />
        global $current_user;</p>
<p>        if (!$this-&gt;user_has_allowed_role($current_user)) {<br />
          return;<br />
        }</p>
<p>        foreach ($this-&gt;prohibited_items as $item) {<br />
            $result = stripos($_SERVER[&#8216;REQUEST_URI&#8217;], $item);<br />
            if ($result !== false) {<br />
                wp_redirect(get_option(&#8216;siteurl&#8217;) . &#8216;/wp-admin/index.php&#8217;);<br />
            }<br />
            break;<br />
        }<br />
    }<br />
    // end of appearance_redirect()</p>
<p>}<br />
// end of class AppearancePermissions()</p>
<p>new AppearancePermissions();</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135490</guid>
					<title><![CDATA[Reply To: Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135490</link>
					<pubDate>Thu, 30 Oct 2014 22:58:32 +0000</pubDate>
					<dc:creator>T R</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135671</guid>
					<title><![CDATA[Reply To: Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135671</link>
					<pubDate>Fri, 31 Oct 2014 07:05:28 +0000</pubDate>
					<dc:creator>Paul R</dc:creator>

					<description>
						<![CDATA[
						<p>Hi,</p>
<p>Thanks for writing in! Regretfully this isn&#8217;t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer, or a service like WerkPress or Elto to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135672</guid>
					<title><![CDATA[Reply To: Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135672</link>
					<pubDate>Fri, 31 Oct 2014 07:13:22 +0000</pubDate>
					<dc:creator>Rich A</dc:creator>

					<description>
						<![CDATA[
						<p>Hi TR. Thought I&#8217;d chime in. There are some WP plugins that allow you to customize the user roles. Here is one&#8230;</p>
<blockquote class="wp-embedded-content" data-secret="E0tbF2U2QR"><p><a href="https://wordpress.org/plugins/user-role-editor/" rel="nofollow">User Role Editor</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; visibility: hidden;" title="&#8220;User Role Editor&#8221; &#8212; Plugin Directory" src="https://wordpress.org/plugins/user-role-editor/embed/#?secret=fA9WG0GXSh#?secret=E0tbF2U2QR" data-secret="E0tbF2U2QR" width="600" height="338" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>I haven&#8217;t tried that particular plugin or any of the others like it so I can&#8217;t speak to how well they work. However  I am considering using one on a couple of sites for just that reason&#8230;to stop well-meaning folks from getting themselves into trouble. 😉</p>
<p>If you decide to use one, please let us know how it goes.</p>
<p>Cheers!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135824</guid>
					<title><![CDATA[Reply To: Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135824</link>
					<pubDate>Fri, 31 Oct 2014 12:40:54 +0000</pubDate>
					<dc:creator>Paul R</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks for the help Rich. </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135974</guid>
					<title><![CDATA[Reply To: Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-135974</link>
					<pubDate>Fri, 31 Oct 2014 16:29:50 +0000</pubDate>
					<dc:creator>T R</dc:creator>

					<description>
						<![CDATA[
						<p>Thank you all for the help and advice. Rich, I&#8217;m actually using that plugin and it&#8217;s working out great (except for this little thing). If I can just not have the &#8216;Customizer&#8217; show on the editor role, it would be exactly what I need in a nutshell; would be so helpful to keep their little fingers off of the customizer! This plugin allows for the editor to have access to ONLY the widgets and menu in the Appearance section which is very helpful, but I just can&#8217;t get the &#8216;customizer&#8217; to disappear. 🙂</p>
<p>Thanks again for the help all!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-136022</guid>
					<title><![CDATA[Reply To: Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-136022</link>
					<pubDate>Fri, 31 Oct 2014 17:29:39 +0000</pubDate>
					<dc:creator>Rich A</dc:creator>

					<description>
						<![CDATA[
						<p>Hi TR. Always happy to help. </p>
<p>I did a little experimenting with User Role Editor on one of my dev sites. I created a new user role, &#8220;Admin&#8221; by duplicating the existing WP Administrator role. Then I unchecked various options until I had what I think would be a good compromise.</p>
<p>As you can see in this image, the settings I used eliminated the Appearance/Customizer&#8230;</p>
<p><img decoding="async" src="http://i.imgur.com/lCCYPbr.jpg" alt="User Role Editor" /></p>
<p>So I think if you tweak things a bit (particularly editing/deleting themes options) you should be able to get the desired results.</p>
<p>Hope that helps! </p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-136024</guid>
					<title><![CDATA[Reply To: Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-136024</link>
					<pubDate>Fri, 31 Oct 2014 17:33:04 +0000</pubDate>
					<dc:creator>Rich A</dc:creator>

					<description>
						<![CDATA[
						<p>Hi TR&#8230;follow up. I see that you still want them to have access to widgets and menus. I&#8217;m guessing that&#8217;s why the customizer is still showing. Without digging into the actual WP database, I&#8217;m not sure if you can avoid that then.</p>
<p>You might ask the developer about it on their support page.</p>
<p>If you get it sorted out, let us know..that would indeed be helpful. </p>
<p>Cheers!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-136039</guid>
					<title><![CDATA[Reply To: Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-136039</link>
					<pubDate>Fri, 31 Oct 2014 17:54:44 +0000</pubDate>
					<dc:creator>T R</dc:creator>

					<description>
						<![CDATA[
						<p>Hi, Rich!<br />
You are absolutely correct. I&#8217;ve played around with it and yep, it seems the &#8216;customizer&#8217; is there being that it&#8217;s attached to something in the code somewhere. If I can get the correct name for it, I may be able to remove it. Not sure. I put in a question to the developer to see if he can help with it at all. The code I added in this thread actually activates the &#8216;edit_theme_options&#8217; but with only the widgets and menu visible which is great, but because the &#8216;edit_theme_options&#8217; is activated, it triggers the &#8216;customizer&#8217; to pop up also. urghh. lol</p>
<p><img decoding="async" src="http://itspeamedia.com/example.PNG" alt="example" /></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-136101</guid>
					<title><![CDATA[Reply To: Remove the Customizer Function from Admin Menu for Editor Roles]]></title>
					<link>https://theme.co/archive/forums/topic/remove-the-customizer-function-from-admin-menu-for-editor-roles/#post-136101</link>
					<pubDate>Fri, 31 Oct 2014 19:50:14 +0000</pubDate>
					<dc:creator>Rad</dc:creator>

					<description>
						<![CDATA[
						<p>Hi T R,</p>
<p>This code works on my end, you can incorporate this code at your code.</p>
<pre><code>add_action(&#039;admin_init&#039;, &#039;remove_customizer&#039;);
function remove_customizer () {
remove_submenu_page( &#039;themes.php&#039;, &#039;customize.php?return=%2Fx%2Fwp-admin%2F&#039; );
remove_menu_page( &#039;customize.php?return=%2Fx%2Fwp-admin%2F&#039; );
}
</code></pre>
<p>Instead of intercepting submenu global variable, will just use wordpress builtin functions. <strong>customize.php?return=%2Fx%2Fwp-admin%2F</strong> is the exact url slug you will see on your browser address bar.</p>
<p>Cheers!</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

