Skip to content

Instantly share code, notes, and snippets.

@Acephalia
Last active June 8, 2024 14:23
Show Gist options
  • Save Acephalia/7fef1ae29b338fda976e05ccf6bc4e41 to your computer and use it in GitHub Desktop.
Save Acephalia/7fef1ae29b338fda976e05ccf6bc4e41 to your computer and use it in GitHub Desktop.
Strip Make.com Quotation Marks From Divi Titles
//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>
@Acephalia
Copy link
Author

Acephalia commented Jun 8, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment