Skip to content

Instantly share code, notes, and snippets.

@aaronranard
Created July 23, 2013 20:04
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 aaronranard/6065667 to your computer and use it in GitHub Desktop.
Save aaronranard/6065667 to your computer and use it in GitHub Desktop.
WordPress: Edit Category / Post List
//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