How to Change WordPress Admin Post / Page Color by Status (Private, Future, Published … )

x theme
(Last Updated On: July 10, 2014)

Use the following code in WordPress theme’s functions.php. This will change the background colors of your choice for post or page within your WordPress admin dashboard based on the post’s current status.

For now, we just know 5 statuses for post or page: Private, Future, Published, Pending and Draft.

<?php
add_action('admin_footer','posts_status_color');
function posts_status_color(){
?>
<style>
.status-private{background:#F2D46F;}
.status-future{background: #C6EBF5 !important;}
.status-publish{/* no background keep wp alternating colors */}
.status-pending{background: #87C5D6 !important;}
.status-draft{background: #FCE3F2 !important;}
</style>
<?php
}

Related posts:

About the author

admin

Leave a Reply

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