Web UI. Have you seen this around?
‘Comment via email’ link available towards the end of every post. Let’s implement it.
generate_after_entry_content hook.All Singular.<a href="mailto:<?php echo get_the_author_meta('user_email'); ?>?subject=Comment on '<?php echo get_the_title(); ?>'&body=Post link: <?php echo get_permalink(); ?>">Comment via email</a>.
And that’s it! Voila! Add some CSS sprinkles for pretty things. There’s surely a more vanilla way to do this, but I have GeneratePress with GenerateBlocks at hand, so that’s what I picked.
RSS feed.
Finally, you want your readers to be able to use the convenience link too! Use the\_content\_feed hook and add to the feed content.
``` add_filter( "the_content_feed", "feed_comment_via_email" );
function feed_comment_via_email($content) { $content .= "
"; return $content; } ```Now let’s check it out:
Golden!
Comment via email.