Title: Static Page date
Last modified: August 18, 2016

---

# Static Page date

 *  [Bonfire](https://wordpress.org/support/users/bonfire/)
 * (@bonfire)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/static-page-date/)
 * Is there a way to change the date that’s displayed on the static pages? I update
   them often and it would be nice if i could edit the timestamp on the pages. I
   am aware that you can do this for individual posts, though… it would be great
   if pages supported this as well.
 * Oh yes, I’m running WP 1.5 gamma (2/3/05), if that helps.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Michael Adams (mdawaffe)](https://wordpress.org/support/users/mdawaffe/)
 * (@mdawaffe)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/static-page-date/#post-139654)
 * Here’s a quick bit of code shamelessly ripped and tweaked from `wp-includes/template-
   functions-general.php`‘s `the_date` function. Put the following into `my-hacks.
   php` and enable my-hacks support in Options->Miscellaneous.
 * `<?php
    function the_page_date($d='', $before='', $after='', $echo = true, $page_date_type
   ='modified') { global $id, $post, $day, $previousday, $newday; $the_date = '';
   if ($page_date_type=='modified') { $db_date = $post->post_modified; } else { 
   $db_date = $post->post_date; } if ($day != $previousday) { $the_date .= $before;
   if ($d=='') { $the_date .= mysql2date(get_settings('date_format'), $db_date);}
   else { $the_date .= mysql2date($d, $db_date); } $the_date .= $after; $previousday
   = $day; } $the_date = apply_filters('the_date', $the_date); if ($echo) { echo
   $the_date; } else { return $the_date; } } ?>
 * Then change the reference in your `page.php` template from `the_date(...)` to`
   the_page_date(...)`
 * This could be made a plugin as well, but this was quick.
 * EDIT: for a slightly more legible version of the above, see [this pastebin](http://www.pastebin.com/237369).
 *  Thread Starter [Bonfire](https://wordpress.org/support/users/bonfire/)
 * (@bonfire)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/static-page-date/#post-139662)
 * Works like a charm, thanks a ton!
 *  [darkcanuck](https://wordpress.org/support/users/darkcanuck/)
 * (@darkcanuck)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/static-page-date/#post-140021)
 * I hate that you can’t edit the date too, so I wrote a simple plugin for it: [http://www.vapourtrails.ca/wp-plugins](http://www.vapourtrails.ca/wp-plugins)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Static Page date’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [darkcanuck](https://wordpress.org/support/users/darkcanuck/)
 * Last activity: [21 years, 3 months ago](https://wordpress.org/support/topic/static-page-date/#post-140021)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
