The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End listing comments in wordpress Re: listing comments in wordpress


Its simple, you are trying to print STDClass object to string. Normally object class can not be converted to string as it has properties assigned to it.


$str = “this is string”;
$object = new stdClass();
$object->test = “string in object”.

If you do

echo $str; // it would print “this is string”

but if you do

echo $object; it would put error as you are getting on in comment list.

but if you do

echo $object->test; // it would print “string in object”

I hope you understood what i explained. You can also check how to get comments from wordpress with get_comments at

here they have mentioned “(Array) Comment objects with the following indexes:”

Kalpesh Patel (