How to show the real post date in a draft

Yes, as you – so far – have no publish date.

You could use $post->post_modified, which will always be the date of the latest modification to the post data.


Debug:

Try hooking into the filter and dump both vars:

function date_dump_callback( $date, $d )
{
    echo '<pre>'; print_r( $date ); print_r( $d ); echo '</pre>';
    return $date;
}
add_filter( 'get_the_date', 'date_dump_callback', 20, 2 );

Leave a Comment