Numbered comments without a plugin? (2 posts)

  1. jenspends
    Posted 4 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
    Posted 4 years ago #

    check this

    (string) (optional) Set the field used to sort comments.
    Default: comment_date_gmt
    (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