How can I add a CSS rule to edit.php?

I’m using add_filter('manage_posts_columns') in my plugin.php to add a column to the Edit Posts listing which is driven by edit.php. How can I attach a CSS style to the edit.php?

I want to be able to color the background of my column td.

Related posts

Leave a Reply

2 comments

  1. As helpful as the codex page linked to is, it unfortunately doesn’t cover hooking onto a set page or pages, rather the examples given generally hook onto the admin_head, which will load your stylesheet for every admin page (you probably don’t want that).

    For hooking onto the edit posts screen, the following hook will do that for you..

    add_action( 'admin_print_styles-edit.php', 'your-function-callback' );
    

    Replace your-function-callback with the name of the function you wish to call with the action.