• I want to remove comments only from pages.

    I have tried commenting out comments_template on pages.php,

    <?php
    	// If comments are open or we have at least one comment, load up the comment template
    	if ( comments_open() || '0' != get_comments_number() )
    		// comments_template();
    ?>

    which does remove the comment box, but there is still the “Leave a Comment” in the left sidebar.

    For example, in my Archives page, https://wanglophile.com/archives/, there is no comment box. However, under the title Archives, there is “Leave a Comment”, https://wanglophile.com/archives/#respond.

    Is is possible to remove the “Leave a Comment”? Is it also possible to remove the author’s name from posts’ right sidebar?

Viewing 1 replies (of 1 total)
  • sure, this CSS will hide the Leave a Comment link in pages and author name in posts. (i haven’t tested it, but it should work.)

    .type-page .comments-link,
    .entry-meta .author {
      display: none;
    }

    you can add it to the end of ryu/style.css, or you can use Jetpack’s Custom CSS module.

Viewing 1 replies (of 1 total)
  • The topic ‘Removing "Leave a Comment" and author name from the right sidebar’ is closed to new replies.