example/2019/01/slug
- or an arbitrary date in the past.Can anyone suggest how I might do this?
example/2019/01/slug
- or an arbitrary date in the past.Can anyone suggest how I might do this?
I'm afraid it won't be possible without any coding, but... It shouldn't be so hard to achieve.
I would approach it this way:
transition_post_status
hook and replace the publish date with the one stored in custom field..
function replace_publish_date( $new_status, $old_status, $post ) {
if ( 'publish' == $new_status && 'future' == $old_status ) {
wp_update_post( array(
'ID' => $post->ID,
'post_date' => get_post_meta( $post->ID, 'real_publish_date', true )
) );
}
}
add_action( 'transition_post_status', 'replace_publish_date', 10, 3 );