Change comment header 'LEAVE A REPLY' and 'Comments are closed'

Posted in: Newspaper
Post count: 106

I want to change the wording of ‘LEAVE A REPLY’ and ‘Comments are closed’

I have copied comments.php to my child theme directory and made the necessary changes. However, they are not being applied. Am I missing something?

Also, if there are no comments on a post and comments have been closed automatically after x days, the message ‘Comments are closed’ does not appear. How can I change this?

TIA

Nigel

Post count: 35449

Hi,

Please provide some more details about what exactly do you want to achieve, in this way I will be able to provide an working answer.
Also the child them must be use as in our guide from here -> https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thank you for your understanding!

Post count: 106

Hi Calin – thanks for getting back to me. There are three things I’d like to achieve as shown in the image at https://imgur.com/uUutA2x

1. Change the text ‘LEAVE A REPLY’ to ‘LEAVE A COMMENT’.

2. Change the text ‘Comments are closed’ TO ‘COMMENTS ARE NO LONGER BEING ACCEPTED'(and change the font size to the same as #reply-title – but I can’t find the css?)

3. Include ‘COMMENTS ARE NO LONGER BEING ACCEPTED’ on posts that have no comments when comments have been closed (which I’ve set to 10 days in WP Dashboard/Discussion Settings/Other comment settings.)

I’ve checked my child theme – all is OK.

I’ve copied comments.php from the Newspaper theme directory to my child theme and edited as follows:

Line 78: $defaults[‘title_reply’] = esc_html__(‘LEAVE A COMMENT’, ‘newspaper’);

Line 35: <p class=”td-pb-padding-side”><?php esc_html_e( ‘COMMENTS ARE NO LONGER BEING ACCEPTED’, ‘newspaper’ ) ?></p>

These changes do not work.

(You will note I use a plugin – Advanced Comment Form – that inserts text into comment form. Disabling the plugin doesn’t solve the problem.)

I hope this helps

Regards

Nigel

Post count: 20688

Hi,

Are you using the Newspaper or the Newsmag theme?

Regardless of the theme however, if you want to customize the comments file, you can copy the file from the composer (not from the theme) – https://prnt.sc/tf4p5c in the child theme main folder – https://prnt.sc/tf4pcb Then you can modify it as you want. Please try it.

Thank you!

Post count: 106

Hi Simion

I’m using the Newspaper theme (I posted the question in the wrong forum.)

I don’t have the a comments.php in the folder you suggested. I did a search and found a number of comment.php files – https://imgur.com/a/VJmjw7b

I used the one in td-standard-pack/Newspaper/ and edited it:

line 95: $defaults[‘title_reply’] = __td(‘LEAVE A COMMENT’, TD_THEME_NAME);
line 52: <p class=”td-pb-padding-side”><?php _etd( ‘COMMENTS ARE NO LONGER BEING ACCEPTED’, TD_THEME_NAME ); ?></p>

It’s made no difference, it’s still showing ‘LEAVE A REPLY’ and ‘Comments are closed’

Regards,

Post count: 106

After experimenting, I found the comments.php file being used is:

tdb-comments.php in plugins/td-cloud-library/parts/

I’ve copied this to my child theme and edited it. This works insofar as the changed texts are being displayed.

BUT, I cannot see how to change the font-family, size and weight of the ‘COMMENTS ARE NO LONGER BEING ACCEPTED’ message. The php code for this is:

echo ‘<p class=”td-pb-padding-side”>’ . _etd( ‘COMMENTS ARE NO LONGER BEING ACCEPTED’, TD_THEME_NAME ) . ‘</p>’;

Also, the message ‘COMMENTS ARE NO LONGER BEING ACCEPTED’ does not appear after posts that have no comments when comments have been closed (which I’ve set to 10 days in WP Dashboard/Discussion Settings/Other comment settings.)

Any thoughts?

Thanks

Post count: 106

I’ve made some further progress:

I’ve included the following in my child theme’s css:

.td-pb-padding-side {font-family: pt serif; font-weight: 700; font-size: 16pt;}

Which should display the ‘Comments are no longer being accepted’ as I want.

However, when I view the post and inspect the element in my web browser, the code:

echo ‘<p class=”td-pb-padding-side”>’ . _etd( ‘COMMENTS ARE NO LONGER BEING ACCEPTED’, TD_THEME_NAME ) . ‘</p>’;

is shown as:

<div class="comment-pagination"> </div>
COMMENTS ARE NO LONGER BEING ACCEPTED
<p class="td-pb-padding-side"></p>

I don’t know how to fix this.

Any thoughts?

Regards

Nigel

Post count: 35449

Hi,

The tdb-comments.php can not be set ion the child theme also the changes made in that file can affect the element functionality.

If you want to change the font style, just provide a post that has this message and I will provide a custom css for you, but you need to know that cloud templates can be edited with tagDiv Composer and it can be set the font with tagDiv Composer -> https://i.imgur.com/80BRjU7.png

Thank you!

Post count: 106

Hi Calin

I wish to change the wording of ‘LEAVE A REPLY’ to ‘LEAVE A COMMENT’ IN https://i.imgur.com/80BRjU7.png (I can’t change this with tagDiv Composer.)

And in https://imgur.com/uUutA2x I want to change the font size of ‘Comments are closed’ to – font-size: 16px;font-weight: 700; font-family: pt serif;

And I’d like to change the text from ‘Comments are closed’ to ‘Comments are no longer being accepted.

Thanks

Post count: 18283

Hello !

In order to translate Leave a reply go to Theme panel – Translations and you can change it as you can see it here: https://www.screencast.com/t/JaPaXrlNYEYW

Unfortunately this cannot be edited at the moment. I have passed this issue to our developers and this will be fixed in a future update.

Thank you !

Post count: 106

Thanks Vlad – I’ve changed the ‘Leave a Reply’ message as suggested.

Another couple of issues that you could pass to the developers is the ability to change the ‘Comments are closed.’ message and modify its css.

If you check my post Property sales collapse hits all markets and scroll to the end of the comments and inspect element, you’ll see the problem – there’s no css to change.

Regards

Nigel

Post count: 18283

Hello !

I have passed that on their suggestion board in order to make that element fully editable using tagDiv composer.

Thank you for your patience !

Post count: 106

Thanks Vlad

Viewing 13 posts - 1 through 13 (of 13 total)
The forum ‘Newspaper’ is closed to new topics and replies.