Created
October 23, 2012 16:43
-
-
Save WebEndevSnippets/3939994 to your computer and use it in GitHub Desktop.
WordPress: Add Category ID in Admin
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
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