Snippet / Theme Builder footer text module or code module
Dynamic Footer Date in Divi
A snippet rewrite target for the current dynamic footer date video.
Use this page as the source for the rewritten dynamic footer date recipe. The final snippet should include a no-PHP option where possible and a PHP/shortcode option only when the implementation is verified.
<span data-current-year></span>
<script>
document.querySelectorAll("[data-current-year]").forEach((node) => {
node.textContent = new Date().getFullYear();
});
</script>
Notes
- Prefer a server-rendered or build-time year when the footer is static.
- If JavaScript is used, make sure the footer still reads cleanly before hydration.