Support

Account

Home Forums Bug Reports Position : High (after title) not working Reply To: Position : High (after title) not working

  • tjkelly’s solution was also not working for me, but it was because of where I had placed the code snippet. It was apparently too late for admin_init to fire, so the code just wasn’t running at all. For those having trouble, put an echo 'test'; at the top of your function to make sure it’s running.

    I changed it to use init instead of admin_init and it worked perfectly for me:

    function prefix_reset_metabox_positions(){
      delete_user_meta( wp_get_current_user()->ID, 'meta-box-order_post' );
      delete_user_meta( wp_get_current_user()->ID, 'meta-box-order_page' );
      delete_user_meta( wp_get_current_user()->ID, 'meta-box-order_YOUR_CPT_SLUG' );
    }
    add_action( 'init', 'prefix_reset_metabox_positions' );