0

I use a different theme named Team Talk (Premium). Since I use this theme, I don't receive the new comment notification by email. I don't know where to look at but I found this in my new theme :

function get_content_html_for_comment($comment){
    $comment_html  = "";
    // Get the comment data
    //switch on the output buffer
    ob_start();
    // Allow the email to the author to be sent
    wp_notify_postauthor($comment_ID, $comment->comment_type);
    $max_depth = get_option('thread_comments_depth');
    $args = array ('max_depth' => $max_depth);
    //render the content to the output buffer
    //call _ht_comment 
    echo _ht_comment($comment, $args, $this->calculate_comment_depth($comment));
    //the content will now be in the buffer, so get that
    $comment_html = ob_get_contents();
    //restore buffer
    ob_end_clean();
    return $comment_html;

So, it seems to allow to receive notification but it doesn't work.

  • Have you contacted the theme author? – Andrew Bartel Dec 17 '13 at 18:37
0

I do not see the $comment_ID variable having any value in your code. So try by changing the following code

wp_notify_postauthor($comment_ID, $comment->comment_type);

to

wp_notify_postauthor($comment->comment_ID, $comment->comment_type);

You can also remove $comment->comment_type as per codex

  • You are my hero – Noob Dec 17 '13 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.