Last active
March 17, 2025 21:29
-
-
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
This file contains hidden or 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
// 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