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

---

# get_theme_support( string $feature, mixed $args ): mixed

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#user-contributed-notes)

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

Gets the theme support arguments passed when registering that support.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#description)󠁿

Example usage:

    ```php
    get_theme_support( 'custom-logo' );
    get_theme_support( 'custom-header', 'width' );
    ```

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

 `$feature`stringrequired

The feature to check. See [add_theme_support()](https://developer.wordpress.org/reference/functions/add_theme_support/)
for the list of possible values.

More Arguments from add_theme_support( … $feature )

The feature being added. Likely core values include:

 * `'admin-bar'`
 * `'align-wide'`
 * `'appearance-tools'`
 * `'automatic-feed-links'`
 * `'block-templates'`
 * `'block-template-parts'`
 * `'border'`
 * `'core-block-patterns'`
 * `'custom-background'`
 * `'custom-header'`
 * `'custom-line-height'`
 * `'custom-logo'`
 * `'customize-selective-refresh-widgets'`
 * `'custom-spacing'`
 * `'custom-units'`
 * `'dark-editor-style'`
 * `'disable-custom-colors'`
 * `'disable-custom-font-sizes'`
 * `'disable-custom-gradients'`
 * `'disable-layout-styles'`
 * `'editor-color-palette'`
 * `'editor-gradient-presets'`
 * `'editor-font-sizes'`
 * `'editor-spacing-sizes'`
 * `'editor-styles'`
 * `'featured-content'`
 * `'html5'`
 * `'link-color'`
 * `'menus'`
 * `'post-formats'`
 * `'post-thumbnails'`
 * `'responsive-embeds'`
 * `'starter-content'`
 * `'title-tag'`
 * `'widgets'`
 * `'widgets-block-editor'`
 * `'wp-block-styles'`

`$args`mixedoptional

Optional extra arguments to be checked against certain features.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#return)󠁿

 mixed The array of extra arguments or the value for the registered feature.

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

    ```php
    function get_theme_support( $feature, ...$args ) {
    	global $_wp_theme_features;

    	if ( ! isset( $_wp_theme_features[ $feature ] ) ) {
    		return false;
    	}

    	if ( ! $args ) {
    		return $_wp_theme_features[ $feature ];
    	}

    	switch ( $feature ) {
    		case 'custom-logo':
    		case 'custom-header':
    		case 'custom-background':
    			if ( isset( $_wp_theme_features[ $feature ][0][ $args[0] ] ) ) {
    				return $_wp_theme_features[ $feature ][0][ $args[0] ];
    			}
    			return false;

    		default:
    			return $_wp_theme_features[ $feature ];
    	}
    }
    ```

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

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

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

Enqueues inline bump styles to make room for the admin bar.

  | 
| [get_classic_theme_supports_block_editor_settings()](https://developer.wordpress.org/reference/functions/get_classic_theme_supports_block_editor_settings/)`wp-includes/block-editor.php` |

Returns the classic theme supports settings for block editor.

  | 
| [_load_remote_featured_patterns()](https://developer.wordpress.org/reference/functions/_load_remote_featured_patterns/)`wp-includes/block-patterns.php` |

Register `Featured` (category) patterns from wordpress.org/patterns.

  | 
| [_load_remote_block_patterns()](https://developer.wordpress.org/reference/functions/_load_remote_block_patterns/)`wp-includes/block-patterns.php` |

Register Core’s official patterns from wordpress.org/patterns.

  | 
| [get_default_block_editor_settings()](https://developer.wordpress.org/reference/functions/get_default_block_editor_settings/)`wp-includes/block-editor.php` |

Returns the default block editor settings.

  | 
| [wp_use_widgets_block_editor()](https://developer.wordpress.org/reference/functions/wp_use_widgets_block_editor/)`wp-includes/widgets.php` |

Determines whether or not to use the block editor to manage widgets.

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

Retrieves an array of media states from an attachment.

  | 
| [_register_core_block_patterns_and_categories()](https://developer.wordpress.org/reference/functions/_register_core_block_patterns_and_categories/)`wp-includes/block-patterns.php` |

Registers the core block patterns and categories.

  | 
| [WP_REST_Themes_Controller::prepare_item_for_response()](https://developer.wordpress.org/reference/classes/wp_rest_themes_controller/prepare_item_for_response/)`wp-includes/rest-api/endpoints/class-wp-rest-themes-controller.php` |

Prepares a single theme output for response.

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

Expands a theme’s starter content configuration using core-provided data.

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

Checks whether the custom header video is eligible to show on the current page.

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

Adds CSS to hide header text for custom logo, based on Customizer setting.

  | 
| [get_custom_logo()](https://developer.wordpress.org/reference/functions/get_custom_logo/)`wp-includes/general-template.php` |

Returns a custom logo, linked to home unless the theme supports removing the link on the home page.

  | 
| [WP_Customize_Background_Image_Control::enqueue()](https://developer.wordpress.org/reference/classes/wp_customize_background_image_control/enqueue/)`wp-includes/customize/class-wp-customize-background-image-control.php` |

Enqueue control related scripts/styles.

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

Displays post format form elements.

  | 
| [WP_Posts_List_Table::inline_edit()](https://developer.wordpress.org/reference/classes/wp_posts_list_table/inline_edit/)`wp-admin/includes/class-wp-posts-list-table.php` |

Outputs the hidden row displayed when inline editing

  | 
| [Custom_Image_Header::get_header_dimensions()](https://developer.wordpress.org/reference/classes/custom_image_header/get_header_dimensions/)`wp-admin/includes/class-custom-image-header.php` |

Calculates width and height based on what the currently selected theme supports.

  | 
| [Custom_Image_Header::get_default_header_images()](https://developer.wordpress.org/reference/classes/custom_image_header/get_default_header_images/)`wp-admin/includes/class-custom-image-header.php` |

Gets the details of default header images if defined.

  | 
| [Custom_Image_Header::step_1()](https://developer.wordpress.org/reference/classes/custom_image_header/step_1/)`wp-admin/includes/class-custom-image-header.php` |

Displays first step of custom header image page.

  | 
| [Custom_Image_Header::step_2()](https://developer.wordpress.org/reference/classes/custom_image_header/step_2/)`wp-admin/includes/class-custom-image-header.php` |

Displays second step of custom header image page.

  | 
| [Custom_Image_Header::reset_header_image()](https://developer.wordpress.org/reference/classes/custom_image_header/reset_header_image/)`wp-admin/includes/class-custom-image-header.php` |

Resets a header image to the default image for the theme.

  | 
| [Custom_Image_Header::js_1()](https://developer.wordpress.org/reference/classes/custom_image_header/js_1/)`wp-admin/includes/class-custom-image-header.php` |

Displays JavaScript based on Step 1 and 3.

  | 
| [Custom_Image_Header::js_2()](https://developer.wordpress.org/reference/classes/custom_image_header/js_2/)`wp-admin/includes/class-custom-image-header.php` |

Displays JavaScript based on Step 2.

  | 
| [Custom_Background::admin_page()](https://developer.wordpress.org/reference/classes/custom_background/admin_page/)`wp-admin/includes/class-custom-background.php` |

Displays the custom background page.

  | 
| [WP_Customize_Manager::register_controls()](https://developer.wordpress.org/reference/classes/wp_customize_manager/register_controls/)`wp-includes/class-wp-customize-manager.php` |

Registers some default controls.

  | 
| [WP_Customize_Manager::_sanitize_header_textcolor()](https://developer.wordpress.org/reference/classes/wp_customize_manager/_sanitize_header_textcolor/)`wp-includes/class-wp-customize-manager.php` |

Callback for validating the header_textcolor value.

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

Retrieves value for custom background color.

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

Default custom background callback.

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

Registers theme support for a given feature.

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

Registers the internal custom header and background routines.

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

Do not use. Removes theme support internally without knowledge of those not used by themes directly.

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

Retrieves the custom header text color in 3- or 6-digit hexadecimal form.

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

Whether to display the header text.

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

Retrieves header image for custom header.

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

Checks if random header image is in use.

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

Gets the header image data.

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

Retrieves background image for custom background.

  | 
| [WP_Admin_Bar::initialize()](https://developer.wordpress.org/reference/classes/wp_admin_bar/initialize/)`wp-includes/class-wp-admin-bar.php` |

Initializes the admin bar.

  | 
| [WP_Customize_Header_Image_Setting::update()](https://developer.wordpress.org/reference/classes/wp_customize_header_image_setting/update/)`wp-includes/customize/class-wp-customize-header-image-setting.php` |  | 
| [get_body_class()](https://developer.wordpress.org/reference/functions/get_body_class/)`wp-includes/post-template.php` |

Retrieves an array of the class names for the body element.

  | 
| [wp_xmlrpc_server::wp_getPostFormats()](https://developer.wordpress.org/reference/classes/wp_xmlrpc_server/wp_getpostformats/)`wp-includes/class-wp-xmlrpc-server.php` |

Retrieves a list of post formats used by the site.

  | 
| [WP_Customize_Header_Image_Control::enqueue()](https://developer.wordpress.org/reference/classes/wp_customize_header_image_control/enqueue/)`wp-includes/customize/class-wp-customize-header-image-control.php` |  | 
| [WP_Customize_Header_Image_Control::render_content()](https://developer.wordpress.org/reference/classes/wp_customize_header_image_control/render_content/)`wp-includes/customize/class-wp-customize-header-image-control.php` |  |

[Show 38 more](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#)

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

| Version | Description | 
| [5.3.0](https://developer.wordpress.org/reference/since/5.3.0/) | Formalized the existing and already documented `...$args` parameter by adding it to the function signature. | 
| [3.1.0](https://developer.wordpress.org/reference/since/3.1.0/) | Introduced. |

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

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/get_theme_support/?output_format=md#comment-content-1620)
 2.   [Codex](https://profiles.wordpress.org/codex/)  [  10 years ago  ](https://developer.wordpress.org/reference/functions/get_theme_support/#comment-1620)
 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%2Ffunctions%2Fget_theme_support%2F%23comment-1620)
    Vote results for this note: 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%2Ffunctions%2Fget_theme_support%2F%23comment-1620)
 4. **Gets the `custom-background` theme support arguments**
 5.     ```php
        $theme_support = get_theme_support( 'custom-background' );
        ```
    
 6. Output:
 7.     ```php
        Array
        (
            [0] => Array
                (
                    [default-image] =>
                    [default-repeat] => repeat
                    [default-position-x] => left
                    [default-attachment] => scroll
                    [default-color] => ffffff
                    [wp-head-callback] => _custom_background_cb
                    [admin-head-callback] =>
                    [admin-preview-callback] =>
                )
    
        )
        ```
    
 8.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_theme_support%2F%3Freplytocom%3D1620%23feedback-editor-1620)

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