0
X
Add Snippet To Project
New Project
Add To Existing Project
$query_args = array(
'author_email' => 'commentauthor@gmail.com',
'number' => 10,
'order' => 'DESC',
);
$query = new WP_Comment_Query( $query_args );
if ( ! empty( $query ) && ! is_wp_error( $query ) ) {
foreach ( $query as $comment ) {
// do something
}
}
else {
// no terms found
}