admin管理员组

文章数量:1022726

I would like to have a custom user role that can edit the Menu items under the Appearance tab. But I don't want my custom role to have the ability to edit every menu on my WordPress site. I only want this role to be able to edit a single menu. For example, in the screenshot below I want my user role to only be able to see and edit Menu A. I don't want my role to see and edit the Header, Footer, or any other menus. I have searched other Stackoverflow questions like the one in this link: allow editors to edit menus?

But that solution allows the role to access every menu on my Wordpress site. In fact, that solution allows the role to access other Appearance functionalities like the ability to customize the theme itself, which I don't want.

I would prefer to solve this problem by writing my own PHP code instead of using an external plugin, although any help would be much appreciated.

I would like to have a custom user role that can edit the Menu items under the Appearance tab. But I don't want my custom role to have the ability to edit every menu on my WordPress site. I only want this role to be able to edit a single menu. For example, in the screenshot below I want my user role to only be able to see and edit Menu A. I don't want my role to see and edit the Header, Footer, or any other menus. I have searched other Stackoverflow questions like the one in this link: allow editors to edit menus?

But that solution allows the role to access every menu on my Wordpress site. In fact, that solution allows the role to access other Appearance functionalities like the ability to customize the theme itself, which I don't want.

I would prefer to solve this problem by writing my own PHP code instead of using an external plugin, although any help would be much appreciated.

本文标签: