I have this code
is_admin() or add_action( 'the_post', function( $post ) {
if ( ! is_singular() or ! is_main_query() )
return;
$post->post_date = current_time( 'mysql' );
$post->post_date_gmt = '';
wp_update_post( $post );
});
When refreshing the page, it will update to current time. But this will slow down my site. So how to update date time of page to current time only 1 time per day ?
Example: I write a post on 5pm, June 6, 2013. And now, when I refresh page, it will change from 5pm, June 6 to 7pm, June 9. And in June 9, if I refresh the page, it will not change anything.
Sorry for my poor English ! Thank you very much !