UPDATE
just in case I haven’t been clear before. The custom meta boxes appear only on my custom post type edit screen, until I update any PAGE. Then, they all show up in all the regular Pages editor.
I just removed all my custom creations, deleted all custom metas from the database, went back to admin and updated a page. Everything ok.
then I created back the custom types and boxes, went to admin and the boxes were showing only inside the custom post type, until I just updated any Page and all the metaboxes came back to the screen after the update.
I also updated a POST and the same thing happened, the custom boxes appeared just after the update 🙁
OK I think it is solved:
the issue was that I was using this to save the metaboxes values:
add_action('save_post', 'player_savemeta');
function player_savemeta(){
global $post;
update_post_meta($post->ID, 'name', $_POST['name']);
...etc...
}
The problem is that it was running the function for all posts saving actions, and so creating the custom boxes for every post.
The solution I found (not tested yet) is to check the post type before saving the metadata:
function player_savemeta(){
global $post;
if (get_post_type($post) == 'player'){
update_post_meta($post->ID, 'name', $_POST['name']);
...etc...
}
}