WP Munk > Blog > Code Snippets > How to make colored admin table by Post Status in WordPress ?

How to make colored admin table by Post Status in WordPress ?

Sometime the default WordPress Admin panel can become a bit boring. If you want to jazz it up and want to show custom background color for each post status then following snippet of code can help. Just paste it in your theme’s functions.php and change the color accordingly

function whe_posts_status_color(){

?>

<style>
  .status-draft{background: #FCE3F2 !important;}
  .status-pending{background: #87C5D6 !important;}
  .status-publish{/* default color works best here */}
  .status-future{background: #C6EBF5 !important;}
  .status-private{background:#F2D46F;}
</style>

<?php
}

add_action('admin_footer','whe_posts_status_color');

About The Author


Mohammad Tajim

Hello, I am Mohammad Tajim a WordPress Developer with over 14 years of experience building WP Products. I made Munk WordPress Theme and other themes available at metricthemes.com. Follow me on twitter @tajim

More free templates for download at: Google Slides Themes

Copyright © 2020 WP Munk.
Built with Munk and Powered by WordPress.