Sort Featured Content by Order instead of ID

If get_featured_posts() returns an array of WP_Post objects, then yes, the usort() function you have should work properly. If you have access to get_featured_posts(), and it uses get_posts() or a WP_Query instance, then you can set the orderby parameter to menu_order, and drop the usort() call.

Why the value of the selector doesnt remain visible in the custom field after I edit the post?

There’s nothing in your code that would allow this to happen. In your HTML you need to add a selected attribute to the <option> element representing the current value. WordPress includes a helper function, selected() which can help with this: function camere_meta_box_render( $post ){ $number = get_post_meta( $post->ID, “function_camere”, true ); echo ‘<div><select name=”function_camere”>’; for( … Read more