Categories
technical

disable post id increase automatically

wordpress make me in trouble ,for example, when I write blog post online, the post id increase automatically,I try google a solutions in blogsearch.google.com, I get a method finaly, but I am not sure it is work.

copy below code into funtions.php , step by step , wp-amdin –> appearance –> editor –> Theme Functions, added below code

/* 关闭自动保存和修订版本 */
remove_action(‘pre_post_update’, ‘wp_save_post_revision’ );
add_action( ‘wp_print_scripts’, ‘disable_autosave’ );
function disable_autosave() {
wp_deregister_script(‘autosave’);
}

I am put this notes here, now post  id is 13, will it increase after save draft ? hope not. let me wait for minutes。

after 30 minutes,modify post many times,

ok, seems it is work now.

Leave a Reply

Your email address will not be published. Required fields are marked *