Notification when certain posts are published

Would you consider using a specific category or tag to use on posts that require notification? If so, you could use Peter’s Collaboration E-mails plugin which can automatically notify you (or other specific users) when a post is set to Pending, Scheduled, or Published. In the plugin settings, you can define specific categories, post tags, … Read more

How can I format email notification after registration?

wp_mail from Codex Use this example: add_filter( ‘wp_mail_content_type’, ‘set_html_content_type’ ); wp_mail( $mails_to, ‘The subject’, ‘<p>The <em>HTML</em> message</p>’ ); // Reset content-type to avoid conflicts — http://core.trac.wordpress.org/ticket/23578 remove_filter( ‘wp_mail_content_type’, ‘set_html_content_type’ ); function set_html_content_type() { return ‘text/html’; }

Removing sensitive information from comment notifications – notify_post_author

There is a hook that should let you alter that data– comment_notification_text. add_action( ‘comment_notification_text’, function($notify_message,$comment_id) { var_dump($notify_message,$comment_id); die; }, 10,2 ); You could parse that $notify_message string and remove the parts you don’t want. add_filter( ‘comment_notification_text’, function($notify_message) { $notify_message = explode(“\n”,$notify_message); foreach ($notify_message as $k => $line) { $header = trim(substr($line,0,strpos($line,’:’))); switch ($header) { case … Read more

send new post notification to an email address stored in a custom field value

I think this would be possible using the wp_mail() function (https://developer.wordpress.org/reference/functions/wp_mail/) alongside the publish_post action. In fact, the publish_post action codex page has an example: https://codex.wordpress.org/Plugin_API/Action_Reference/publish_post function post_published_notification( $ID, $post ) { $author = $post->post_author; /* Post author ID. */ $name = get_the_author_meta( ‘display_name’, $author ); $email = get_the_author_meta( ‘user_email’, $author ); $title = $post->post_title; … Read more