# Print the Page Address and Date on Printouts

> Adds a line with the page's web address and the print date at the bottom of printed pages, so paper copies can always be traced back to the original.

- Type: HTML
- Runs: Site-wide footer
- Category: [Frontend & Design](https://wpide.com/library/category/frontend/)
- Tags: print, printing, citations
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/frontend-print-url-and-date/

## Code

```html
<style>
.wpide-print-source{display:none;}
@media print{.wpide-print-source{display:block;margin-top:2em;padding-top:.6em;border-top:1px solid #999;font-size:10pt;color:#333;}}
</style>
<script>
window.addEventListener('beforeprint', function () {
    var note = document.querySelector('.wpide-print-source');
    if (!note) {
        note = document.createElement('p');
        note.className = 'wpide-print-source';
        document.body.appendChild(note);
    }
    note.textContent = 'Source: ' + window.location.href.split('#')[0] + ' \u2014 printed ' + new Date().toLocaleDateString();
});
</script>
```

## Notes

Only visible on paper or PDF exports; nothing changes on screen.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Print the Page Address and Date on Printouts" in its snippet library and add it in one click; or create a new HTML snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
