Created
April 20, 2014 18:29
-
-
Save thagxt/11121283 to your computer and use it in GitHub Desktop.
Change default e-mail address and name on outgoing e-mails sent by WordPress.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Change default e-mail address and name on outgoing e-mails sent by WordPress. | |
// code goes in your theme functions.php | |
// New Email | |
function sb_new_mail_from( $email ) { | |
$email = 'info@yoursite.com'; // change | |
return $email; | |
} | |
add_filter( 'wp_mail_from', 'sb_new_mail_from' ); | |
// New Name | |
function sb_new_mail_from_name( $name ) { | |
$name = 'Your Website Name'; // change | |
return $name; | |
} | |
add_filter( 'wp_mail_from_name', 'sb_new_mail_from_name' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment