Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is it possible to set certain settings from the theme functions file for example the setting Enable threaded (nested) comments ca I set it to allow 2 as the answer without having the user go into the admin panel and setting it for there wordpress comment settings?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Well, you can do something like this which will always reset the option to 2:

add_action('init', 'update_comment_depth');
function update_comment_depth() {
  update_option('thread_comments_depth', 2);
}
share|improve this answer
add comment

Your Answer

 
discard

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.