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.

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.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Creating Admin Themes article in Codex shows you how to add css styles to admin pages

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.