• Hi,

    I’m trying to get the original published date and time from a post.
    Normally you’d say I can use

    $the_post = get_post($post_ID);
    $dateline = $the_post->post_date;

    But when updating a post the post_ID changes and the post_date I get is from the revision, and not from the published post.

    I’ve tried to get arround this with the
    get_post_ancestors($the_post);
    but sadly have no clue how to go from there…

    Is there a way to get the original publish date from the post on a revision?

    Thanks and best regard,

    Paul

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Get Published Date and Time’ is closed to new replies.