Support » Plugin: Comment Reply Email Notification » Change the italics in the notification email

  • Resolved phoenixblue

    (@phoenixblue)


    Hi,
    I really like this plugin. It works perfectly. There’s just one thing I don’t like. The reply it shows in the notification email is in italics which makes it harder to read. I’m not tech-savvy so I don’t understand how to edit the template. Is it possible you can add a way to change the template in an options menu or what’s the easiest way I can change the italics to normal text in the reply email? Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    There is no italics in the email template. It must be your client which does this.

    Also see:

    https://github.com/arnowelzel/worpdress-comment-reply-email-notification/blob/main/templates/cren/notification.php

    And the procedure to change the template is described in the documentation in “Customizing the email template”.

    Edit: I think about a template editor for future versions.

    Thread Starter phoenixblue

    (@phoenixblue)

    Thanks for the reply.

    See photo: https://i.imgur.com/seiNf9q.png

    This is what I mean by italics. The part of the email that shows the reply is in italics for some reason. I tested it multiple times and that part is always in italics. That’s what I wanted to change. I wonder why it’s doing that. There’s no italics in my comments section.

    Plugin Author Arno Welzel

    (@awelzel)

    Yep – I missed that part. There is a EM tag for the comment, sorry for the confusion.

    Anyway – the instructions how to create a custom template are very clear. In that custom template you need then to remove “em” tags before and after the comment content in line 7.

    Thread Starter phoenixblue

    (@phoenixblue)

    Thanks. I was able to edit the template. I only removed the em tags and the italics went away but it seems to have messed up the format a bit, like the extra space in this photo:
    https://i.ibb.co/jDLzGSx/Screenshot-20210107-232623-2.png

    Do you know what went wrong?

    Plugin Author Arno Welzel

    (@awelzel)

    Please show me the exact content of the template, then I can tell you what is wrong.

    If you want to post it here, use the “CODE” element in the comments, so it will be displayed like this (otherwise HTML elements would not show here).

    This is how it should be (without italic text):

    
    <h2><?php printf(__('Hi %s', 'comment-reply-email-notification'), $parent->comment_author) ?>,</h2>
    
    <p><?php printf(__('%s has replied to your comment on', 'comment-reply-email-notification'), $comment->comment_author) ?></p>
    
    <p><a href="<?php echo get_permalink($parent->comment_post_ID) ?>"><?php echo get_the_title($parent->comment_post_ID) ?></a></p>
    
    <p><?php echo esc_html($comment->comment_content) ?></p>
    
    <p><a href="<?php echo get_comment_link($parent->comment_ID) ?>"><?php echo __('Click here to reply', 'comment-reply-email-notification') ?></a></p>
    
    <p><a href="<?php echo cren_get_unsubscribe_link($parent) ?>"><?php echo __('Click here to stop receiving these messages', 'comment-reply-email-notification') ?></a></p>
    
    Thread Starter phoenixblue

    (@phoenixblue)

    Hi Arno,

    Thanks for the code. I used the cren/notification.php file from your github. I noticed in your github file, the closing p tag is missing in this line:

    <p><em><?php echo esc_html($comment->comment_content) ?></em>

    so when I removed the em tags, there was no closing p tag.

    I used the code you posted and everything is fixed now, and works the way I want. Thank you very much for the support and the awesome plugin. Thanks.

    Plugin Author Arno Welzel

    (@awelzel)

    Thanks for your feedback – good to hear that it works now for you.

    Yes the </p> tag is missing in the original code and I’ll change this for future updates. It should not be a problem, but tags should be closed properly. The code was not originally developed by me – I am just the current maintainer of the project and may have just missed this issue.

    At the moment I’m quite busy with other projects, so I can’t say when the next update with a form editor will be – however it should also not break existing customizations people might already have done, so it could take a while.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.