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
While using the WP admin and you drag a field group, WP makes an AJAX request with the action “meta-box-order”. This causes the built in action on that request to run which saves the order. The ajax action I posted fires before the built in WP action because the priority is set to 0 (zero) and the one for WP is set to 1. The new action prevents both the saving of the meta box order and the internal WP action from firing.
The only way to get them “unstuck” is to delete the user’s meta box order entries in the DB. There isn’t any real way to fix this without working directly in the DB.
The code I posted will prevent them being moved in the future. Or I should say, if you add the PHP part then the boxes can be moved but when the page reloads then the boxes will be back where they are supposed to be. If you also implement the JS code then the boxes can never be moved.
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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz
— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.