Created
July 28, 2013 01:49
-
-
Save milesstewart88/6097020 to your computer and use it in GitHub Desktop.
Custom CPT Columns // manage_edit-{post_name}_columns. To add the custom fields to the admin columns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Orders - Custom Columns | |
*/ | |
add_filter( 'manage_edit-orders_columns', 'my_edit_orders_columns' ) ; | |
function my_edit_orders_columns( $columns ) { | |
$columns = array( | |
'cb' => '<input type="checkbox" />', | |
'title' => __( 'Order ID' ), | |
'email' => __( 'Email Address' ), | |
'order_amount' => __( 'Amount' ), | |
'trans_id' => __( 'Transaction ID' ), | |
'order_status' => __( 'Order status' ) | |
); | |
return $columns; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment