WordPress.org

Ready to get started?Download WordPress

Forums

Numbered comments without a plugin? (2 posts)

  1. jenspends
    Member
    Posted 2 years ago #

    I'm trying to minimize the number of plugins I use on my site. Right now my comments are set up as an ordered list, which generates the comment numbers. The problem is, the comments are also paginated, so the comment numbers start all over again when I navigate to a different page of comments. Is there a way to fix this without using a plugin?

  2. ysr5
    Member
    Posted 2 years ago #

    check this

    $orderby
    (string) (optional) Set the field used to sort comments.
    Default: comment_date_gmt
    
    $order
    (string) (optional) How to sort $orderby. Valid values:
    'ASC' - Ascending (lowest to highest).
    'DESC' - Descending (highest to lowest).
    Default: DESC

    you can choose every fild in the database->wp_comments table structure as the $orderby parameter. but this would generate a array with all comments so you have to filter them checking the post_ID === $page_id (get_the_ID()) or you build your own sql statemant to get your custom array.

Topic Closed

This topic has been closed to new replies.

About this Topic