Hide admin menu items for different environments?

Is there an easy-ish way in Bedrock/Sage to show/hide different admin menu items based on environment? Let’s say I don’t want clients to be able to see a bunch of plugin menu items or something for example.

Try Intervention. By “environment” do you mean development, staging, and production? If so, combine Intervention with those environment variables (i.e. env('WP_ENV')).


Yup thanks that’s perfect.

I’m also doing this in my sage-advanced-custom-fields package to hide the ACF menus on production. You can see how I did it there, if that’s helpful.

1 Like