Removing the ‘Leave a comment’ link on WordPress

I want my ‘Leave a comment’ section to not link to the comment.php file as I’m going to use it for toggling instead.

Here is the code:

Read More
<span class="comments-link"><?php comments_popup_link( __( '0 Comments', 'Bomb!' ), __( '1 Comment', 'Bomb!' ), __( '% Comments', 'Bomb!' ) ) ?></span>

I’m a bit of a PHP noob so I’m wondering how to remove the comments_popup_link part without ruining the number of comments displayed.

Related posts

Leave a Reply

2 comments

  1. @user1636968

    Per you need you can toggle comments from your Post or Page in WordPress by Check/Unchecked Allow comments in Discussion Section just underneath WYSIWYG Area of your Post/Page.

    Also there is Screen Options expandable section (underneath User Info) in top right of WordPress Admin, from where you can choose what to types of section you want to have in your post/page in WordPress.

    Check attached image for more detail information.toggling comments in wordpress

    Also, you can take a look at below ref. to customized WordPress admin…

    http://sixrevisions.com/wordpress/how-to-customize-the-wordpress-admin-area/

    Here is one more ref. which adddress same problem like you have…
    https://wordpress.stackexchange.com/questions/11222/is-there-any-way-to-remove-comments-function-and-section-totally

  2. I think the best way to do this is in the CSS, not in the PHP code, although my wordpress-fu is a bit rusty.

    Try this in your CSS file:

    .comments-link { display: none; }