I can get the wordpress comments list using get_comments.
For example:
$comments = get_comments('status=approve&number=10');
It returns the trackbacks also. Is it possible to get only human comments (without trackbacks etc)? Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I believe:
Check out the documentation reference, though in the case of
get_comments()it’s not particularly helpful.Also, another possible syntax which I find cleaner, is that the above syntax is equivalent to:
The
$argsarray defines the constraints you want when getting the comments.