Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_comments [ WordPress Function ]

get_comments ( $args = '' )
Parameters:
  • (mixed) $args Optional. Array or string of options to override defaults.
Uses:
  • $wpdb
Returns:
  • (array) List of comments.
Defined at:



Retrieve a list of comments.

The comment list can be for the blog as a whole or for an individual post.

The list of comment arguments are 'status', 'orderby', 'comment_date_gmt', 'order', 'number', 'offset', and 'post_id'.

Source


<?php
function get_comments$args '' ) {
    
$query = new WP_Comment_Query;
    return 
$query->query$args );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics