Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
Created October 23, 2012 16:43
Show Gist options
  • Save WebEndevSnippets/3939994 to your computer and use it in GitHub Desktop.
Save WebEndevSnippets/3939994 to your computer and use it in GitHub Desktop.
WordPress: Add Category ID in Admin
add_filter( 'manage_edit-category_columns', 'we_categoriesColumnsHeader' );
add_filter( 'manage_category_custom_column', 'we_categoriesColumnsRow', 10, 3 );
/**
* Add Category ID column in admin
*
*/
function we_categoriesColumnsHeader($columns) {
$columns['catID'] = __('ID');
return $columns;
}
function we_categoriesColumnsRow($argument, $columnName, $categoryID){
if($columnName == 'catID'){
return $categoryID;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment