My meta boxes update wp_postmeta of posts but not of pages. What is wrong with the code? October 10, 2022 by Tarik Billa change the line if ( 'page' == $_POST['post_type'] ) { To if ( 'page' == get_post_type($post_id) ) {