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' );
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.