WordPress.org

Forums

Comment depth - controlling indents (3 posts)

  1. roibot
    Member
    Posted 2 years ago #

    Hi,

    The theme I am building has nested comments that indent.

    I have room to indent 4 levels.

    Is there anyway to force programatically set the maximum threaded discussion level.
    " Enable threaded (nested) comments levels deep" = 4

    Of course I can just code the css to cover not indenting depths-5 to depth-10

  2. Jeremy Clark
    Moderator
    Posted 2 years ago #

    When calling wp_list_comments on your comments.php template file use the arg max_depth.
    wp_list_comments( array('max_depth' => 4) );

    Reference: http://codex.wordpress.org/Function_Reference/wp_list_comments

  3. roibot
    Member
    Posted 2 years ago #

    Many thanks, I missed that :-) works perfectly.

Topic Closed

This topic has been closed to new replies.

About this Topic