WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/current theme supports

Description

Checks a theme's support for a given theme feature.

Usage

<?php current_theme_supports$feature ); ?>

Parameters

$feature
(string) (required) the feature being checked
Default: None

Features list:

  • 'post-thumbnails'
  • 'post-formats'
  • 'custom-header'
  • 'custom-background'
  • 'menus'
  • 'automatic-feed-links'
  • 'editor-style'
  • 'widgets'
  • 'html5'

Return Values

(boolean) 

Examples

<?php 
if (current_theme_supports('custom-header')) {
  // do something special when custom-header is supported...
}
?>

Notes

  • Uses global: (unknown type) $_wp_theme_features

Change Log

Source File

current_theme_supports() is located in wp-includes/theme.php.

Related

Theme Support: add_theme_support(), remove_theme_support(), current_theme_supports()
Features: sidebar, menus, post-formats, post-thumbnails, custom-background, custom-header, automatic-feed-links, content_width, editor-style, html5

See also index of Function Reference and index of Template Tags.