Home / admin / Add ID column for category listing
  • How to Add ID column for category listing

    no thumbnail sorry: Add ID column for category listing

    Adding this PHP code to the functions.php of your wordpress theme will add a new column that will display the category ID. Great tool that will stop the need to hover over a category to display the ID.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    function categoriesColumnsHeader($columns) {
    	$columns['catID'] = __('ID');
    	return $columns;
    }
    add_filter( 'manage_categories_columns', 'categoriesColumnsHeader' );
    function categoriesColumnsRow($argument, $columnName, $categoryID){
    	if($columnName == 'catID'){
    		return $categoryID;
    	}
    }
    add_filter( 'manage_categories_custom_column', 'categoriesColumnsRow', 10, 3 );
    

    ( WordPress codex functions, hooks, in this snippet. )

    add_filter, __,