WordPress.org

Ready to get started?Download WordPress

Forums

Ryu
Removing "Leave a Comment" and author name from the right sidebar (2 posts)

  1. wanglophile
    Member
    Posted 1 year ago #

    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, http://wanglophile.com/archives/, there is no comment box. However, under the title Archives, there is "Leave a Comment", http://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?

  2. Ryan
    Member
    Posted 11 months ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.