theme.json and frontend.css
-
Hello Gutenverse users and teams!
1st of all thank you for great added value to WP ecosystem.I do face issues with overwriting my headings styling by frontend.css (/wp-content/plugins/gutenverse/lib/framework/assets/css/frontend.css) -> very similar to that topic https://ww.wp.xz.cn/support/topic/a-gutenverse-update-changed-css-on-my-site-made-headers-tiny/
My biggest concern is:
- why config from theme.json doesn’t work ? – please notice that I do use child-theme approach and my function.php is following:
<?php
// Dodaj wsparcie dla theme.json i globalnych stylów
function vorfolio_child_theme_setup() {
// Wsparcie dla globalnych stylów i theme.json
add_theme_support('wp-block-styles');
add_theme_support('editor-styles');
add_theme_support('block-editor-settings');
add_theme_support('block-templates');
// Wsparcie dla custom-spacing
add_theme_support('custom-spacing');
// Wsparcie dla custom-units
add_theme_support('custom-units');
// Wsparcie dla custom-line-height
add_theme_support('custom-line-height');
}
add_action('after_setup_theme', 'vorfolio_child_theme_setup');
// Zmodyfikowana funkcja ładowania stylów
function vorfolio_child_enqueue_styles() {
// Załaduj style motywu nadrzędnego
wp_enqueue_style(
'parent-style',
get_template_directory_uri() . '/style.css',
array(),
wp_get_theme()->parent()->get('Version')
);
// Załaduj frontend.css motywu nadrzędnego
wp_enqueue_style(
'parent-frontend-style',
get_template_directory_uri() . '/assets/css/frontend.css',
array('parent-style'),
wp_get_theme()->parent()->get('Version')
);
// Załaduj style motywu potomnego
wp_enqueue_style(
'child-style',
get_stylesheet_uri(),
array('parent-frontend-style'),
wp_get_theme()->get('Version')
);
}
add_action('wp_enqueue_scripts', 'vorfolio_child_enqueue_styles');
// Dodaj wsparcie dla edytora bloków
function vorfolio_child_block_editor_settings() {
add_theme_support('editor-styles');
add_editor_style('style.css');
}
add_action('after_setup_theme', 'vorfolio_child_block_editor_settings');My temporary solution is that I’ve simple removed heding styling from frontend.css however what I am looking for is full styling genereted from theme.json.
The page I need help with: [log in to see the link]
The topic ‘theme.json and frontend.css’ is closed to new replies.
