Support

Account

Home Forums Backend Issues (wp-admin) Reorder ACF Groups (per page basis) Reply To: Reorder ACF Groups (per page basis)

  • There isn’t any way to do this per page/post of the same post type. It is WP that is remembering and ordering the groups when you move them and it does this on a per/screen basis (post type, taxonomy, etc.). WP stores this value in the _usermeta table with meta_key of meta-box-order_{$screen}. There are no filter hooks available that would allow altering this order directly.

    There might be a way to modify this value.

    WP calls this to get the option

    
    $sorted = get_user_option( "meta-box-order_$page" );
    

    There is a filter in get_user_option()

    
    return apply_filters( "get_user_option_{$option}", $result, $option, $user );
    

    It should be possible to alter the order on the “page” post type with a filter

    
    add_filter('get_user_option_meta-box-order_page', 'YourFunctionName', 10, 3)
    

    Exactly how you you would alter the returned value I couldn’t say without actually building something and testing it.