Created
December 13, 2017 11:00
-
-
Save vanbernaert/71b79ef44fcb9d5631371d93559c9702 to your computer and use it in GitHub Desktop.
Keep WordPress Post Date & Time on current time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp_update_post( | |
array ( | |
'ID' => 101, // ID of the post to update | |
'post_date' => $time, | |
'post_date_gmt' => get_gmt_from_date( $time ) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for example for posts presented in a timeline to keep a post permanent on top ...