Wednesday 22 January 2014

How To Add Colors To Private,Published,Drafts Posts In Admin

In WordPress we always have a boring same color of different posts, in order to specify each type of WordPress post in different colors ,there is a simple snippet which needs to be added in functions.php file. As you can change colors for yourselves.
In $value field add the below css by using php functionality.


add_action('admin_footer','posts_status_color');
function posts_status_color(){
$value='';
echo $value;
}

.status-draft{background: #FCE3F2 !important;}
.status-pending{background: #87C5D6 !important;}
.status-publish{/* no background keep wp alternating 

colors */}
.status-future{background: #C6EBF5 !important;}
.status-private{background:#F2D46F;}

No comments:

Post a Comment