Created
July 24, 2025 08:30
-
-
Save MrJoshFisher/ded33eba348de45dee7ba4b4314dfa24 to your computer and use it in GitHub Desktop.
[ThemeSupports] #wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Essential theme supports | |
* */ | |
function theme_setup(){ | |
/** automatic feed link*/ | |
add_theme_support( 'automatic-feed-links' ); | |
/** tag-title **/ | |
add_theme_support( 'title-tag' ); | |
/** post formats */ | |
$post_formats = array('aside','image','gallery','video','audio','link','quote','status'); | |
add_theme_support( 'post-formats', $post_formats); | |
/** post thumbnail **/ | |
add_theme_support( 'post-thumbnails' ); | |
/** HTML5 support **/ | |
add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ) ); | |
/** refresh widgest **/ | |
add_theme_support( 'customize-selective-refresh-widgets' ); | |
/** custom background **/ | |
$bg_defaults = array( | |
'default-image' => '', | |
'default-preset' => 'default', | |
'default-size' => 'cover', | |
'default-repeat' => 'no-repeat', | |
'default-attachment' => 'scroll', | |
); | |
add_theme_support( 'custom-background', $bg_defaults ); | |
/** custom header **/ | |
$header_defaults = array( | |
'default-image' => '', | |
'width' => 300, | |
'height' => 60, | |
'flex-height' => true, | |
'flex-width' => true, | |
'default-text-color' => '', | |
'header-text' => true, | |
'uploads' => true, | |
); | |
add_theme_support( 'custom-header', $header_defaults ); | |
/** custom log **/ | |
add_theme_support( 'custom-logo', array( | |
'height' => 60, | |
'width' => 400, | |
'flex-height' => true, | |
'flex-width' => true, | |
'header-text' => array( 'site-title', 'site-description' ), | |
) ); | |
} | |
add_action('after_setup_theme','theme_setup'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment