Title: admin_print_styles
Published: April 25, 2014
Last modified: February 24, 2026

---

# do_action( ‘admin_print_styles’ )

## In this article

 * [More Information](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#wp--skip-link--target)

Fires when styles are printed for all admin pages.

## 󠀁[More Information](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#more-information)󠁿

`admin_print_styles` should not be used to enqueue styles or scripts on the admin
pages. Use `[admin_enqueue_scripts](https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/)`
instead.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#source)󠁿

    ```php
    do_action( 'admin_print_styles' );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/admin-header.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/admin-header.php#L137)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/admin-header.php#L137-L137)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#related)󠁿

| Used by | Description | 
| [iframe_header()](https://developer.wordpress.org/reference/functions/iframe_header/)`wp-admin/includes/template.php` |

Generic Iframe header for use with Thickbox.

  | 
| [wp_iframe()](https://developer.wordpress.org/reference/functions/wp_iframe/)`wp-admin/includes/media.php` |

Outputs the iframe to display the media upload page.

  | 
| [WP_Customize_Widgets::print_styles()](https://developer.wordpress.org/reference/classes/wp_customize_widgets/print_styles/)`wp-includes/class-wp-customize-widgets.php` |

Calls admin_print_styles-widgets.php and admin_print_styles hooks to allow custom styles from plugins.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.6.0](https://developer.wordpress.org/reference/since/2.6.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 3 content](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#comment-content-6208)
 2.    [Niloy – Codeixer](https://profiles.wordpress.org/im_niloy/)  [  3 years ago  ](https://developer.wordpress.org/reference/hooks/admin_print_styles/#comment-6208)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_print_styles%2F%23comment-6208)
     Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_print_styles%2F%23comment-6208)
 4.  Add custom inline CSS into the admin area
 5.      ```php
         add_action( 'admin_print_styles', 'wpdocs_admin_inline_css' );
         /**
          * Adds inline style
          */
         function wpdocs_admin_inline_css() {
         	echo '<style>div#wpcontent { background: #e6fcff; }</style>';
         }
         ```
     
 6.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_print_styles%2F%3Freplytocom%3D6208%23feedback-editor-6208)
 7.   [Skip to note 4 content](https://developer.wordpress.org/reference/hooks/admin_print_styles/?output_format=md#comment-content-6907)
 8.    [shahadul878](https://profiles.wordpress.org/shahadul878/)  [  2 years ago  ](https://developer.wordpress.org/reference/hooks/admin_print_styles/#comment-6907)
 9.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_print_styles%2F%23comment-6907)
     Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_print_styles%2F%23comment-6907)
 10. Add custom inline CSS into the admin area. You must add style tag.
 11.     ```php
         add_action( 'admin_print_styles', 'wpdocs_admin_column_styles' );
         /**
          * Adds Column inline style
          */
         function wpdocs_admin_column_styles() {
         	$custom_css = 'table.wp-list-table .column-thumb { 
         		width: 52px; 
         		text-align: center;
         		white-space: nowrap;
         	}';
     
         	echo '<style>' . $custom_css . '</style>';
         }
         ```
     
 12.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_print_styles%2F%3Freplytocom%3D6907%23feedback-editor-6907)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_print_styles%2F)
before being able to contribute a note or feedback.