Change Admin Post/Page List Color By Status

Favorite WordPress tip of the week:

This snippet will change the background colors of posts, pages, and custom post types in the administration post/page lists based on their status, i.e. draft, private, pending, etc.

<?php
add_action('admin_footer','posts_status_color');
function posts_status_color(){
?>
<style>
.status-draft { background: #ffffe0 !important ; }
.status-future { background: #cf9 !important; }
.status-publish { /* no background - keep alternating rows */ }
.status-pending { background: rgba(170, 204, 255, 0.39) !important; }
.status-private { background:#fc9; }
</style>
<?php
}

Note: Draft color changed to a slightly lighter yellow than original.
Update on 5/18/2016: Changed pending color to lighter blue.

5 thoughts on “Change Admin Post/Page List Color By Status”

Leave a Reply to A Cancel reply