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');

Leave a Reply

Your email address will not be published. Required fields are marked *