Introduction
BuddyBoss and WordPress do not provide a built-in option to remove the unsubscribe disclaimer text that appears in the email footer (for example: “If you don’t want to receive these emails in the future, please unsubscribe.”). If you would like to remove this text, you can do so using a custom function that filters the email content before it is sent.
Custom Workaround
- Go to Appearance > Theme Editor in your WordPress admin dashboard.
- Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
- From the Theme Files list, click Theme Functions (functions.php).
- Paste the following code just before the closing PHP tag (?>):
function remove_email_footer_paragraph( $content ) {
// Define the paragraph to be removed
$pattern = '/<p style="margin: 5px 0;">.*?<\/p>/s';
// Remove the specific paragraph from the email content
$content = preg_replace( $pattern, '', $content );
return $content;
}
add_filter( 'wp_mail', 'remove_email_footer_paragraph' );
- Click Update File to save your changes.
Troubleshooting and FAQs
Q: The unsubscribe text is still showing in emails.
A: Make sure the code is added to the active theme’s functions.php file and that no other plugin is injecting or modifying the email footer after wp_mail runs.
Q: Will this remove other paragraphs from my emails?
A: The snippet targets paragraphs matching a specific inline style. If your email template uses the same style for other paragraphs, those may also be affected. In that case, the pattern may need to be refined.
Q: Does this affect all outgoing emails?
A: Yes. This filter applies to all emails sent using wp_mail().
Q: Can I revert this change easily?
A: Yes. Simply remove the code from functions.php and save the file.
Q: Who can I contact for further assistance?
A: Please review the BuddyBoss Support Policy or consult a qualified developer for advanced customizations.