I am working on a wordpress site that usually allows three levels of nested comments. But I would like for (at least) one specific page to allow only one level of comments => no nesting.

How can I do that?

edit: requested clarification: I can identify this page by the used page-template.

  • Please take a look at the faq as plugin recommendations are off topic. – kaiser Jan 31 '13 at 13:07
  • Okay, any different idea how to solve this? – dexBerlin Jan 31 '13 at 13:37
  • Please hover over the voting arrows to get a hint on what is needed to ask a proper question. A guid on how to ask can be found in the faq. Thanks. – kaiser Jan 31 '13 at 13:47
  • I am sorry, I do not get the point. Regarding the faq I do not see, where I missed the "how to ask" section. I really do not want to be rude, I just want to understand, what exactly I did wrong. Thank you for helping me out. – dexBerlin Jan 31 '13 at 14:10
  • No problem at all. Every question needs a basic amount of research shown, which you did by adding the "i can identify the page by it's template" comment. – kaiser Jan 31 '13 at 14:36

Please reference the Codex entry for wp_list_comments().

This function includes a 'max_depth' parameter in its args array.

On the specific page in question, simply call:

<?php wp_list_comments( array( 'max_depth' => '1' ) ); ?>

If you need more specific help, please clarify your question to indicate how you would identify the specific page in question. By title/slug/id? By Page Template? Some other way?

| improve this answer | |

Your Answer

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

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