So I have a custom role and I'd like to block access to the plugins.php page without using a plugin.

I can remove pages from the admin menu with my functions file but not sure how to restrict access

  • 1
    which role? Have you considered removing the capability to manage plugins from that role? – Tom J Nowell Mar 2 at 23:54
  • I have created a custom role 'owner', which has admin capability with some admin menu items hidden. I dont want them to access the plugins page, I've hidden the menu item but also want to block the page if they try to go to the url for it – user1961395 Mar 3 at 10:02
  • i dont know if without plugin, but i often use this plugin www.wordpress.org/plugins/admin-menu-editor/ which pro version – rahmat hidawe Mar 7 at 18:18

Your Answer

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

Browse other questions tagged or ask your own question.