I understand different themes use different css for the reply link however there should be enough native WP css to narrow it down to the lowest nested comment.

I'm trying to get my head around the default WP comment css that will give me the ability to hide display:none; all the reply links except for the very bottom layer of the nested comments.


I believe the easiest way to do that will be with javascript. Something that will navigate at each comment list and show only last button. Something like:

jQuery(document).ready( function($){

    //Hide all buttons
    $('.comments li .reply-button').hide(0);

    //Navigate through all comments
    $('.comments li').each( function() {

        //Lets check if there is children comments in this one
        if (! ($(this).children('.children').length > 0)) {

            //Don't have, so let's show this button

  • How/where would I use this? – Pete Jan 25 '16 at 16:27
  • In an script file or even outputting it directly in the sections comments – Bruno Cantuaria Jan 25 '16 at 21:54
  • I added the snippet by following these instructions but it didn't work... wordpress.org/support/topic/… – Pete Jan 26 '16 at 10:39
  • Sorry about the late, this code is just a sample, you would still need to adapt it to your comments structure. – Bruno Cantuaria Feb 4 '16 at 16:25

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.