WordPress.org

Ready to get started?Download WordPress

Forums

wp_list_comments help (8 posts)

  1. neologan
    Member
    Posted 4 years ago #

    Hi, i'm trying to find an answer to a problem i have.

    at the moment my wp_list_comments is like this:

    wp_list_comments('type=comment&callback=custom_comments')

    but i also want to change from a list to divs, and to do this i must have this inside too:

    wp_list_comments(array('style' => 'ol')

    My question is how do i do both at the same time?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Try wp_list_comments('type=comment&callback=custom_comments&style=ol')

  3. neologan
    Member
    Posted 4 years ago #

    thanks so much, this appears to have worked :)

  4. Shane G
    Member
    Posted 4 years ago #

    Hi,

    Refer this article:

    http://codex.wordpress.org/Template_Tags/wp_list_comments#Usage

    Thanks,

    Shane G.

  5. neologan
    Member
    Posted 4 years ago #

    edited: was not very easy to understand, redone below.

  6. neologan
    Member
    Posted 4 years ago #

    that probably made no sense, what i mean is, you have three options:

    <?php wp_list_comments(array('style' => 'ul')); ?>
    <?php wp_list_comments(array('style' => 'ol')); ?>
    <?php wp_list_comments(array('style' => 'div')); ?>

    but what about having nothing? i want the option to turn this off completly so i can place it where ever i please, i.e, in the comment loop.

  7. neologan
    Member
    Posted 4 years ago #

    At the moment the only way i can remove this is to edit wp-includes/comment-template.php directly, go to line 1296 and edit out </div>

    please tell me there is a way to do this from wp_list_comments?

  8. esmi
    Forum Moderator
    Posted 4 years ago #

    Not that I'm aware of. :-(

    What is it that you want to achieve? Could it be done via CSS?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.