WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an older theme that I've modified to support threaded comments. I would like the individual admins in my multisite install to be able to choose whether threaded comments are enabled. However, I'd like to restrict the ability to choose the maximum number of levels to super admins.

Looking at the capabilities, it seems that all capabilities for the settings screen are grouped together as one capability. Is it possible to restrict just this single option so that it is forced to be the same static value across the entire blog network?

share|improve this question
up vote 1 down vote accepted

There is only one hook for threaded comments depth - thread_comments_depth_max and it sets max value for depth ( default is 10 ), you can use this filter and set max depth fox non-Super Admins number that you want.

if ( ! current_user_can( 'manage_network' ) ) {
   mamaduka_thread_comments_depth_max( $maxdeep ){
       return 5; // or any number you want
   add_filter( 'thread_comments_depth_max', 'mamaduka_thread_comments_depth_max' );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.