0

I am using the get_comments() function which works well if I give it any array of parameters except if I give the following array:

$defaults = array('ID' => $comment_id); 

$com=get_comments($defaults );

The resulting array contains all data for all comments of my website. I want to get only the data of the comment with id = $comment_id.

Thank you for your feedbacks.

2

I am sorry for wasting your time I think there is a simple function that can do this:

<?php
$defaults = $comment_id; 
$com= get_comment($defaults ); ?>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.