Colorize posts in admin panel by their status

If you’re using WordPress and publishing posts, you probably already know that there are different post statuses which can help you manage your articles.

While you’re writing an article, your post will be saved as a draft every now then. You can leave your post as a draft so that you can continue with your writing, you may publish it when ready, or you can leave a post for review. If you write your article in advance, you can schedule it for a later release or you can make your post private.

As you can see, there are several post statuses and if you work with most of them and have several authors, coloring your posts on the backend can help you quite a lot.

While published posts aren’t labeled, pending and drafted ones will have a label next to post title. While this will definitely help you identifying post statuses you can make everything even more organized and easier to recognize. Yes, we are talking about changing colors of rows in which certain posts are being displayed in the admin panel.

Since changing colors in the admin panel is very easy, you shouldn’t have excuses of leaving everything by default. In this article, we’re about to show you how to do that.

Change status color:

  1. Open functions.php file from your theme
  2. Copy and paste the following code:
  3. function status_color(){
    echo '<style>.status-draft{background: #FCE3F2 !important;}.status-pending{background: #87C5D6 !important;}.status-publish{/* no background*/ }.status-future{background: #C6EBF5 !important;}.status-private{background:#F2D46F;}</style>';
  4. Change colors if you want to
  5. Save changes

As you can see from the code, you are changing the style of your statuses. Actually, you are only changing the background color for your drafts and posts left for review, while the published one will stay the same. Of course, you can change the color from your published posts as well – simply add the CSS code instead of a comment:

.status-published {background: green !important;}

And that is all you need to do in order to color your posts according to their status. Cool, isn’t it?

Want to change the entire admin color scheme? See how you can do that and add extra schemes.

Start Blog Book


This guide is an introduction to mastering the art of blogging. It provides easy to follow steps to start, maintain, and grow your blog.

Read the guide

Leave a Reply

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