function post_date_update(){
$args = array(
'post_type' => 'post',
'posts_per_page' => -1,
);
$wpost = new WP_Query($args);
if ( $wpost->have_posts() ) :
while ( $wpost->have_posts() ) : $wpost->the_post();
$update_params = array(
'ID' => get_the_ID(),
'post_date' => current_time('mysql'),
);
wp_update_post( $update_params );
endwhile; wp_reset_postdata(); endif;
}
add_action( 'init', 'post_date_update' );Bunu functions.php dosyasına yapıştırın. Dosyanız şifreli değil ise. Güncel hali budur.
syntax error, unexpected '$args' (T_VARIABLE)Bu hatayı aldım hocam