Skip to content

Instantly share code, notes, and snippets.

@TorbenL
Last active April 28, 2020 11:56
Show Gist options
  • Save TorbenL/b4aa4ef32ad9fbefe15df7cdc3e56704 to your computer and use it in GitHub Desktop.
Save TorbenL/b4aa4ef32ad9fbefe15df7cdc3e56704 to your computer and use it in GitHub Desktop.
felix-wp-columns.php
<?php
add_filter ( 'manage_pages_columns', function($columns) {
return array_merge($columns, ['internal_note' => 'Interne Notiz']);
});
add_filter ( 'manage_pages_custom_column', function($column, $post_id) {
if($column === 'internal_note') {
echo get_field('internal_note', $post_id);
return;
}
}, 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment