Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

What I'd like to do is have the entire row be a different color - for example, a light blue for draft posts. That way I can visually see at a glance what's a draft, what's scheduled, and what's published on a given time period (I am working on a system for scheduling posts out weeks in advance).

It would seem the logical way to do this is to alter the row color, since there is a CSS class ("status-draft") for example. However, it appears that altering the row color doesn't work since the individual cells as well have overriding colors.

Thoughts?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

you mean something like this?

enter image description here

then here you go:

add_action('admin_footer','style_posts_list');
function style_posts_list(){
?>
<style>
.status-draft{background-color: #008866 !important;}
.status-pending{background-color: #F53162 !important;}
.status-publish{background-color: #FFF700 !important;}
<?php
}
share|improve this answer
    
woops forgot you can close out php and load the style then re-open. I must be tired –  xLRDxREVENGEx Jun 3 '11 at 21:49

Yes you can add this to your functions.php file on your current theme

<?
add_action('admin_head', 'post_color_css');

function post_color_css() {
    //Change the #ccc to what hex color you want
    print '
        <style type="text/css">
        #the-list .status-publish {background-color: #ccc}
        #the-list .status-draft {background-color: #ccc}
        #the-list .status-pending {background-color: #ccc}
        </style>
        ';
}
?>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.