Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to add in the below function a check to see if the comment depth is greater than 1, or if the comment is a reply so the 'My Rating' option does not appear when it is a comment reply. Or need the my rating field to be hidden or not displayed when on reply in CSS.

if($userRatingsEnabled) {
    //get the ip address            
    if(strpos($meta,$ip) === false) {
    if ( $depth <= 1 ) { 

        echo '<div class="comment_rating_label label"><label for="rating">'. __('My Rating','made') . '</label></div>';

        echo '<div class="comment_rating"><select id="rating" name="rating"><option value="">---------</option>';

...more code

Please help!


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.