Skip to content

Instantly share code, notes, and snippets.

@hirejordansmith
Last active August 28, 2019 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hirejordansmith/89f01dd59c4e6f4c3472906acbcbb135 to your computer and use it in GitHub Desktop.
Save hirejordansmith/89f01dd59c4e6f4c3472906acbcbb135 to your computer and use it in GitHub Desktop.
Move ACF Field Groups back to High (after title) position
<?php
add_action( 'admin_init', 'prefix_reset_metabox_positions' );
function prefix_reset_metabox_positions(){
// for posts
delete_user_meta( wp_get_current_user()->ID, 'meta-box-order_post' );
// for pages
delete_user_meta( wp_get_current_user()->ID, 'meta-box-order_page' );
// for custom post type Sermon Series
// replace "sermon-series" with your custom post type
delete_user_meta( wp_get_current_user()->ID, 'meta-box-order_sermon-series' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment