Home › Forums › Gutenberg › Cannot get field group to appear after editor for CPT › Reply To: Cannot get field group to appear after editor for CPT
The problem you have is that someone has already reordered the boxes. The first thing you need to do is find all of the user meta and delete it.
I would employ 2 things form here https://wordpress.stackexchange.com/questions/2474/disable-dragging-of-meta-boxes
1) Disable the boxes from being sorted in the first place. In a custom JS file that loads in the admin I add
(function($){
$(document).ready(function(e) {
$('.meta-box-sortables').sortable({
disabled: true
});
$('.postbox .hndle').css('cursor', 'pointer');
});
})(jQuery);
Then, in case that fails for some reason I add the following which prevents the saving of the order meta, priority of 0 causes my action to fire before the built in WP action.
// disable saving of metabox order
add_action('wp_ajax_meta-box-order', 'disable_meta_box_order_save', 0);
function disable_meta_box_order_save() {
wp_die(-1);
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.