Title: wp_get_custom_css
Published: December 7, 2016
Last modified: August 20, 2026

---

# apply_filters( ‘wp_get_custom_css’, string $css, string $stylesheet )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_get_custom_css/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_get_custom_css/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_get_custom_css/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_get_custom_css/?output_format=md#changelog)

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

Filters the custom CSS output into the head element.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_get_custom_css/?output_format=md#parameters)󠁿

 `$css`string

CSS pulled in from the Custom CSS post type.

`$stylesheet`string

The theme stylesheet name.

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

    ```php
    $css = apply_filters( 'wp_get_custom_css', $css, $stylesheet );
    ```

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

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

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

Fetches the saved Custom CSS content for rendering.

  |

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

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

## User Contributed Notes

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