WordPress.org

Ready to get started?Download WordPress

Forums

Problem with function start_lvl in comment_template (1 post)

  1. eprieto
    Member
    Posted 2 years ago #

    Hi, I'm coding a template that needs to have a special structure for the comments.
    Searching how to make it, I founded that I can call to wp_list_comments() with the callback arg calling to a function in my functions.php. Thats was ok.
    I made my function, then I call to wp_list_comments('type=comment&callback=custom_comments&style=div'), when I setup the arg style=div I cant know which comments are replys cause the function start_lvl (line 1241 of wp-includes/comment-template.php) have this switch:

    1244	                switch ( $args['style'] ) {
    1245	                        case 'div':
    1246	                                break;
    1247	                        case 'ol':
    1248	                                echo "<ol class='children'>\n";
    1249	                                break;
    1250	                        default:
    1251	                        case 'ul':
    1252	                                echo "<ul class='children'>\n";
    1253	                                break;
    1254	                }

    If I setup style=div I dont get any way to know if is a children, do you know a better way to do what I need??

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic