Created
July 23, 2013 20:04
-
-
Save aaronranard/6065667 to your computer and use it in GitHub Desktop.
WordPress: Edit Category / Post List
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
//Edit the Category List | |
add_filter( 'manage_edit-post_type_columns', 'set_custom_edit_post_type_columns' ); | |
// Add to admin_init function | |
add_filter( 'manage_post_type_custom_column', 'manage_post_type_columns', 10, 3); | |
function manage_post_type_columns($out, $column_name, $id) { | |
switch ($column_name) { | |
case 'icon_image': | |
// Output custom post_type field here | |
$out .= ''; | |
break; | |
default: | |
break; | |
} | |
return $out; | |
} | |
function set_custom_edit_post_type_columns($columns) { | |
unset( $columns['description'] ); | |
$columns['icon_image'] = __( 'Image', 'icon_image' ); | |
return $columns; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment