Skip to content

Instantly share code, notes, and snippets.

@DeveloperWilco
Created January 9, 2018 11:07
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 DeveloperWilco/13dbcfd0381dd67dd73dcef2a933c780 to your computer and use it in GitHub Desktop.
Save DeveloperWilco/13dbcfd0381dd67dd73dcef2a933c780 to your computer and use it in GitHub Desktop.
Stack Q
add_filter('manage_posts_columns', 'my_columns');
function my_columns($columns) {
$columns['status'] = 'Status płatności';
return $columns;
}
add_action('manage_posts_custom_column', 'my_show_columns');
function my_show_columns($name) {
global $post;
switch ($name) {
case 'status':
$views = print_r( get_post_meta($post->ID, 'status', true), true );
// or this
// $views = print_r( get_field( 'status', $post->ID ), true );
echo $views;
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment