Adding custom columns to the WordPress admin area

WordPress provides plenty of great functionality out of the box. However, adding extra information to the admin area can help massively with the day-to-day running of a website. In this post I'm going to go through how to add custom columns to the post listing screen. I've created a 'cars' Custom Post Type. A very easy way to do so is to use this generator and add the code provided to the 'functions.php'...

Add a Custom Column in Posts and Custom Post Types Admin Screen

In this tutorial we will see how to add a new column to the WordPress Posts management screen and in this column we will show the Featured Image of each Post. This new column will also be added in the management screen of any active Custom Post Type. Step 1 Activate Featured Images In this tutorial we will use the functions.php file available in our active theme directory. If the file is not...

How to add File Size admin column in WordPress Media Library

Add the following in child theme’s functions.php: add_filter( 'manage_media_columns', 'sk_media_columns_filesize' ); /** * Filter the Media list table columns to add a File Size column. * * @param array $posts_columns Existing array of columns displayed in the Media list table. * @return array Amended array of columns to be displayed in the Media list table. */ function sk_media_columns_filesize( $posts_columns ) { $posts_columns['filesize'] = __( 'File Size', 'my-theme-text-domain' ); return $posts_columns; }...