版本:wordpress5.3.2-zh_CN
打开theme.php
feature | ||
1 | post-thumbnails | All post types are already supported |
2 | post-formats | |
3 | html5 | You can’t just pass ‘html5’, you need to pass an array of types |
4 | custom-logo | |
5 | custom-header-uploads | |
6 | custom-header | |
7 | custom-background | |
8 | title-tag | |
其他: | ||
9 | editor-style | |
automatic-feed-links |
2020主题用到了哪些?
// Add default posts and comments RSS feed links to head. add_theme_support( ‘automatic-feed-links’ ); | |
// Custom background color. add_theme_support( ‘custom-background’, array( ‘default-color’ => ‘f5efe0’, ) ); | |
add_theme_support( ‘post-thumbnails’ ); // Set post thumbnail size. set_post_thumbnail_size( 1200, 9999 ); // Add custom image size used in Cover Template. add_image_size( ‘twentytwenty-fullscreen’, 1980, 9999 ); | |
add_theme_support( ‘custom-logo’, array( ‘height’ => $logo_height, ‘width’ => $logo_width, ‘flex-height’ => true, ‘flex-width’ => true, ) ); | |
add_theme_support( ‘title-tag’ ); | |
add_theme_support( ‘html5’, array( ‘search-form’, ‘comment-form’, ‘comment-list’, ‘gallery’, ‘caption’, ‘script’, ‘style’, ) ); | |
// Add support for full and wide align images. add_theme_support( ‘align-wide’ ); | |
if ( is_customize_preview() ) { require get_template_directory() . ‘/inc/starter-content.php’; add_theme_support( ‘starter-content’, twentytwenty_get_starter_content() ); } | |
// Add theme support for selective refresh for widgets. add_theme_support( ‘customize-selective-refresh-widgets’ ); | |