[resolved] wp_list_comments (3 posts)

  1. ckruse
    Posted 6 years ago #

    I am having a crazy amount of trouble with wp_list_comments(). I am trying to create my own custom function to display comments.

    Within the_loop I have:


    Then, in my functions.php file I have:

    function lp_comment($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>

    <p style="white-space:nowrap">
    <strong class="w-name"><?php comment_author(); ?>
    <?php comment_text(); ?>
    <?php the_time(); ?>


    It will not display anything. No matter where I put it. I have even tried calling lp_comment directly, which will throw an error stating that parameters are missing. But not so much as a space using wp_list_comments.

    PLEASE HELP ME! I am going crazy!


  2. Justin Tadlock
    WordPress God
    Posted 6 years ago #

    This shouldn't go in The Loop:


    It should go within your comments.php template.

    Read this article for a good tutorial:

  3. ckruse
    Posted 6 years ago #

    Thanks. I just ended up writing my own function to query the comments table and display them formatted just as I like them. Works great!

Topic Closed

This topic has been closed to new replies.

About this Topic