Last active
June 8, 2024 14:23
-
-
Save Acephalia/7fef1ae29b338fda976e05ccf6bc4e41 to your computer and use it in GitHub Desktop.
Strip Make.com Quotation Marks From Divi Titles
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
//If you'd be inclined to support the support you can caffeinate me at https://buymeacoffee.com/acephaliax | |
// Apply globally via Divi > Theme Options > Integrations > Head or via code module to both Blog and All Posts templates in theme builder. | |
<script type="text/javascript"> | |
document.addEventListener("DOMContentLoaded", function() { | |
// Remove quotation marks from the direct text content of elements with class "entry-title" | |
const titleElement = document.querySelector(".entry-title"); | |
if (titleElement) { | |
titleElement.textContent = titleElement.textContent.replace(/^“|”$/g, ''); | |
} | |
// Remove quotation marks from the text content of anchor tags within elements with class "entry-title" | |
const titleLinks = document.querySelectorAll('.entry-title a'); | |
titleLinks.forEach((titleLink) => { | |
titleLink.textContent = titleLink.textContent.replace(/“|”/g, ''); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For reddit thread : https://www.reddit.com/r/divi/comments/1daeeba/is_there_a_way_to_control_the_markup_conversion/
Caffeinate me at https://buymeacoffee.com/acephaliax