0
X
Add Snippet To Project
New Project
Add To Existing Project
if ( ! function_exists( 'wpturbo_register_custom_theme_support' ) ) {
/**
* Add theme support for WordPress features.
*
* @return void
*/
function wpturbo_register_custom_theme_support() : void {
// Add theme support for HTML5 Semantic Markup
$semantic_support = [
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
];
add_theme_support( 'html5', $semantic_support );
// Add theme support for Post Formats
$formats = [
'status',
'aside',
'chat',
'gallery',
'image',
'link',
'quote',
'video',
'audio',
];
add_theme_support( 'post-formats', $formats );
// Add theme support for Featured Images for posts.
add_theme_support( 'post-thumbnails');
// Add theme support for Custom Background.
$args = [
'default-color' => '#000',
];
add_theme_support( 'custom-background', $args );
// Add theme support for Custom Header.
$args = [
'default-image' => get_template_directory_uri() . '/default-header.jpg',
'width' => 960,
'height' => 300,
'flex-width' => true,
'default-text-color' => '#000000',
];
add_theme_support( 'custom-header', $args );
// Add theme support for Automatic Feed Links.
add_theme_support( 'automatic-feed-links' );
// Add theme support for document Title tag.
add_theme_support( 'title-tag' );
}
add_action( 'after_setup_theme', 'wpturbo_register_custom_theme_support' );
}