The problem lies in your soto_user_meta_box_save
function. This function is tied to the save_post
action, which means it will fire whenever any post of any post type is saved, not just your custom post type.
You need to add a check inside this function so it aborts when testing the wrong post type:
function soto_user_meta_box_save( $post_id ) {
// Bail if we're doing an auto save
if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
// if our nonce isn't there, or we can't verify it, bail
// if( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'my_meta_box_nonce' ) ) return;
// if our current user can't edit this post, bail
if( !current_user_can( 'edit_post' ) ) return;
// if this isn't the right post type, bail
if ( 'soto_post_type' !== get_post_type( $post_id ) ) return;
...
Now, the routine will go through an additional check and compare the type of the post being saved with that of the one to which your custom meta box applies. If they don’t match, it won’t continue. This means pages (and posts) will be unaffected by the function in the future.
(Note: I didn’t know the name of your post type, so I guessed above …)