Skip to content

Instantly share code, notes, and snippets.

@presswizards
Last active March 17, 2025 21:29
Show Gist options
  • Save presswizards/d1fa3e049bfae57db65790a170465387 to your computer and use it in GitHub Desktop.
Save presswizards/d1fa3e049bfae57db65790a170465387 to your computer and use it in GitHub Desktop.
Divi Theme Change Contact Form Subject Line to remove site name and tagline
// Instead of creating a custom Contact Form element:
add_filter('gettext', 'edit_divi_contact_form_subject', 10, 3);
function edit_divi_contact_form_subject($translated_text, $text, $domain)
{
if ($text === 'New Message From %1$s%2$s' && $domain === 'et_builder') {
return 'New Contact Form Message';
}
return $translated_text;
}
// You can also add this CSS to customize the Success message style of the form:
.et-pb-contact-message p {
font-size: x-large;
font-style: italic;
font-weight: 600;
color: darkgreen;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment