Hugo, I use a code in the childtheme functions.php which adds a Post ID column in Posts and reviews table.
/**
* Just adds a column without content
*
* @param array $columns Array of all the current columns IDs and titles
*/
function misha_add_column( $columns ){
$columns[‘misha_post_id_clmn’] = ‘ID’; // $columns[‘Column ID’] = ‘Column Title’;
return $columns;
}
add_filter(‘manage_posts_columns’, ‘misha_add_column’, 5);
//add_filter(‘manage_pages_columns’, ‘misha_add_column’, 5); // for Pages
/**
* Fills the column content
*
* @param string $column ID of the column
* @param integer $id Post ID
*/
function misha_column_content( $column, $id ){
if( $column === ‘misha_post_id_clmn’)
echo $id;
}
add_action(‘manage_posts_custom_column’, ‘misha_column_content’, 5, 2);
//add_action(‘manage_pages_custom_column’, ‘misha_column_content’, 5, 2); // for Pages
-
This reply was modified 5 years, 9 months ago by ellis2611.