WordPress.org

Support

Support » Plugins and Hacks » Hacks » Numbered comments without a plugin?

Numbered comments without a plugin?

  • 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?

Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)
  • The topic ‘Numbered comments without a plugin?’ is closed to new replies.
Skip to toolbar