You may face this problem when you switch off posting comments. here i will explain you how to remove comments off text from post title.
Step 1 : In the above picture you can see the comments off text below title. To remove this text login tour Cpanel and go to wp-includes/comment-template.php
Step 2 : In comment-template.php file find the code function comments_popup_link
Step 3 : find the below code in function comments_popup_link
--------------------------------------------------------------
if ( false === $none ) {
/* translators: %s: post title */
$none = sprintf( __( 'Comments Off<span class="screen-reader-text"> on %s</span>' ), $title );
----------------------------------------------------
Step 4 : Remove Comments Off<span class="screen-reader-text"> on %s</span> from the above code.
Step 5 : After removing the line from the above code the code looks like this
---------------------------------------------------
if ( false === $none ) {
/* translators: %s: post title */
$none = sprintf( __( '' ), $title );
---------------------------------------------------
Now save the file and you are done. You will no longer see the comments off text below title.
Step 2 : In comment-template.php file find the code function comments_popup_link
Step 3 : find the below code in function comments_popup_link
--------------------------------------------------------------
if ( false === $none ) {
/* translators: %s: post title */
$none = sprintf( __( 'Comments Off<span class="screen-reader-text"> on %s</span>' ), $title );
----------------------------------------------------
Step 4 : Remove Comments Off<span class="screen-reader-text"> on %s</span> from the above code.
Step 5 : After removing the line from the above code the code looks like this
---------------------------------------------------
if ( false === $none ) {
/* translators: %s: post title */
$none = sprintf( __( '' ), $title );
---------------------------------------------------
Now save the file and you are done. You will no longer see the comments off text below title.
I was able to remove the text "Comments Off" successfully, but I still have the two vertical bars that originally bracketed the Comments Off text. Any idea of how to remove them also - i.e. prevent that line being printed at all?
ReplyDelete