add_theme_support


add_theme_support ( $feature, $args )

Parameters:
  • (string) 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-styles' - 'featured-content' - 'html5' - 'link-color' - 'menus' - 'post-formats' - 'post-thumbnails' - 'responsive-embeds' - 'starter-content' - 'title-tag' - 'widgets' - 'widgets-block-editor' - 'wp-block-styles'
  • (mixed) args Optional extra arguments to pass along with certain features.
Returns:
  • (void|false) Void on success, false on failure.
Defined at:
Change Log:
  • 3: .
  • 3: .
  • 3: .
  • 3: .
  • 4: .
  • 4: .
  • 4: .
  • 5: .
  • 5: .
  • 5: .
  • 5: .
  • 5: .
  • 5: .
  • 5: .
  • 5: .
  • 5: .
  • 6: .
  • 6: .
  • 6: .
  • 6: .
  • 6: .
  • 6: .

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 {@see 'after_setup_theme'}. The {@see 'init'} 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, _add_default_theme_supports, remove_theme_support, _remove_theme_support, add_post_type_support

Top Google Results

User discussions

wpseek mobile