WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to ask how to disable the editing of time and date published? Also, I would like to ask if it's possible for people who doesn't own the blog to post, not just comment, but post their own posts in the blog. Please and thank you.

share|improve this question
These are two very different Questions. Please open a new one for the issue "blog owner", thanks and welcome! – brasofilo Nov 5 '12 at 13:42

There is no straightforward way to do this-- at least not one that I see. That is, there don't seem to be any hooks specifically intended for this task. You still have options though. This is what I'd do:

First, deny changes.

function deny_post_date_change( $data, $postarr ) {
  unset( $data['post_date'] );
  unset( $data['post_date_gmt'] );
  return $data;
add_filter( 'wp_insert_post_data', 'deny_post_date_change', 0, 2 );

You could add conditions for administrators if you wanted, or conditions for future posts, but the code as-is will completely remove any ability to edit the publication dates.

You will still see the form pieces though, so hide those with css.

function hide_publication_date_elements() { ?>
  <style type="text/css">
    a.edit-timestamp, #timestampdiv {display:none;}
add_action( 'admin_enqueue_scripts', 'hide_publication_date_elements' );

These functions can go in your theme's functions.php or in a plugin.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.