WordPress.org

Ready to get started?Download WordPress

Forums

How to style the comment list? (3 posts)

  1. Monique Van Hooreweder
    Member
    Posted 1 year ago #

    In comments.php page there is only next for the comment list:

    <ol class="commentlist">
    	<?php wp_list_comments(); ?>
    </ol>

    How do I style this? Can anyone give me the link to the docs? I don't find them. Thanks.

  2. Jose Castaneda
    Member
    Posted 1 year ago #

    How I learned was looking at the way the default twenty twelve does it. It uses a callback to a function.
    <?php wp_list_comments( array( 'callback' => 'custom_comments' ) ); ?>
    Where 'custom_comments' is the name of your function for styling.

    function custom_comments( $comment, $args, $depth ){
      // The code for your custom comment styling
    };

    Hope that helps. :)

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

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

    use a browser inspection tool (such as Firebug) to investigate the html and css structure of the comment list output in the browser, and use css to format it.

Topic Closed

This topic has been closed to new replies.

About this Topic