add_theme_support


add_theme_support ( $feature, $args )

Parameters:
  • (string) feature The feature being added. Likely core values include 'post-formats', 'post-thumbnails', 'custom-header', 'custom-background', 'custom-logo', 'menus', 'automatic-feed-links', 'html5', 'title-tag', 'customize-selective-refresh-widgets', 'starter-content', 'responsive-embeds', 'align-wide', 'dark-editor-style', 'disable-custom-colors', 'disable-custom-font-sizes', 'editor-color-palette', 'editor-font-sizes', 'editor-styles', 'wp-block-styles', and 'core-block-patterns'.
  • (mixed) args Optional extra arguments to pass along with certain features.
Returns:
  • (void|bool) False on failure, void otherwise.
Defined at:
Change Log:
  • 3: .
  • 3: .
  • 3: .
  • 4: .
  • 4: .
  • 4: .
  • 5: .
  • 5: .
  • 5: .
  • 5: .
  • 5: .
  • 5: .

Description

Registers theme support for a given feature.Must be called in the theme's functions.php file to work. If attached to a hook, it must be Array. The Array hook may be too late for some features. Example usage: add_theme_support( 'title-tag' ); add_theme_support( 'custom-logo', array( 'height' => 480, 'width' => 720, ) );

Related Functions

get_theme_support, remove_theme_support, add_post_type_support, _remove_theme_support, current_theme_supports

Top Google Results

User discussions

wpseek mobile