Skapade stöd för default logo och bakgrund
This commit is contained in:
BIN
assets/images/logo.png
Normal file
BIN
assets/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
BIN
assets/images/wallpaper.webp
Normal file
BIN
assets/images/wallpaper.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -7,3 +7,15 @@ add_action('wp_enqueue_scripts', function() {
|
||||
filemtime(get_theme_file_path('theme.css'))
|
||||
);
|
||||
});
|
||||
add_action('after_setup_theme', function () {
|
||||
add_theme_support('custom-logo', [
|
||||
'height' => 250,
|
||||
'width' => 250,
|
||||
'flex-width' => true,
|
||||
'flex-height' => true,
|
||||
]);
|
||||
|
||||
set_theme_mod('custom_logo', attachment_url_to_postid(
|
||||
get_theme_file_uri('assets/images/logo.png')
|
||||
));
|
||||
});
|
||||
21
theme.json
21
theme.json
@@ -3,7 +3,11 @@
|
||||
"version": 3,
|
||||
|
||||
"settings": {
|
||||
"appearanceTools": true,
|
||||
"appearanceTools": true,
|
||||
"custom": {
|
||||
"defaultLogo": "assets/images/logo.png",
|
||||
"transition": "all 0.3s ease"
|
||||
},
|
||||
"color": {
|
||||
"palette": [
|
||||
{ "slug": "background-primary", "name": "Background Primary", "color": "#0E0F12" },
|
||||
@@ -102,19 +106,20 @@
|
||||
"shadow": "0 0 12px rgba(0,0,0,0.6)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"custom": {
|
||||
"transition": "all 0.3s ease"
|
||||
}
|
||||
},
|
||||
|
||||
"styles": {
|
||||
"css": "body { \
|
||||
background-image: url('/wp-content/themes/wp-theme-crille2026/assets/images/background.webp'); \
|
||||
background-size: cover; \
|
||||
background-position: center; \
|
||||
background-repeat: no-repeat; \
|
||||
background-attachment: fixed; \
|
||||
}",
|
||||
"color": {
|
||||
"background": "var(--wp--preset--color--background-primary)",
|
||||
"background": "transparent",
|
||||
"text": "var(--wp--preset--color--text-primary)"
|
||||
},
|
||||
|
||||
"typography": {
|
||||
"fontFamily": "var(--wp--preset--font-family--inter)",
|
||||
"fontSize": "var(--wp--preset--font-size--normal)"
|
||||
|
||||
Reference in New Issue
Block a user