How To Set Post Color By Status In WordPress Admin Panel

Status
Archive. Not re-tested yet.
Written
Note
Steps and screens may have changed since. Check them against your own WordPress before you rely on them.

Here’s another simple, but useful trick for WordPress posts. This trick will allow you to set post color by status in WordPress’s admin panel. You can set the color of the posts that appear on your admin panel by their status.

It’s a great trick if you’re running a website with lot of drafts, scheduled & pending review posts. It’ll be easy for you to know the status of the post just by looking at it. It also looks great in WordPress 3.8 Parker theme.

Just add this following snippet to your current theme’s functions.php file:

add_action('admin_footer','posts_status_color');
function posts_status_color(){
?>
<style>
 .status-draft { background: #ffffe0 !important;}
 .status-future { background: #E9F2D3 !important;}
 .status-publish {/* no background keep WordPress colors */}
 .status-pending { background: #D3E4ED !important;}
 .status-private { background: #FFECE6 !important;}
 .status-sticky { background: #F9F9F9 !important;}
 .post-password-required { background: #F7FCFE !important;}
</style>
<?php
}

You can easily change background colors by editing above code. How about I submit a ticket to WordPress about this?

More re-tested in WordPress

1 comment

Leave a comment

Your email address won’t be published. Name, email and comment are required.