This snippet enhances the WordPress admin experience by showing important custom fields in the post list view.
add_filter('manage_posts_columns', 'add_acf_columns');
function add_acf_columns($columns) {
$columns['custom_field'] = __('Custom Field');
return $columns;
}
add_action('manage_posts_custom_column', 'show_acf_columns', 10, 2);
function show_acf_columns($column, $post_id) {
if ($column == 'custom_field') {
echo get_field('custom_field_name', $post_id); // Replace with your field name
}
}