Home Forums Basel support forum Enque child theme style.css >after< basel stylesheets

Enque child theme style.css >after< basel stylesheets

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #395006

    ataub2qf
    Participant

    Afaik the child theme should always be enqued after the main themes css, so you can easily change the styles.

    However this is not the case in basel theme. See screenshot with the conflicting css files highlighted, as well as the element for example, whose settings got overridden by basel parent theme (was not the case with the older basel theme version).

    How can this be fixed, as there is a lot of modified css within the child theme?
    Thx!

    Attachments:
    You must be logged in to view attached files.
    #395009

    ataub2qf
    Participant

    Accidentially added the same image twice. Here the other.

    Attachments:
    You must be logged in to view attached files.
    #395374

    Hello,

    As soon as you update all the plugins, check the issue and we will check this issue as well.

    Best Regards,

    #395410

    ataub2qf
    Participant

    I don’t know what this has toda with those 4 external plugins that have available updates in the meantime, but they are now also updates.

    So everything is updated right now.

    Attachments:
    You must be logged in to view attached files.
    #395834

    Hello,

    Our theme does not include these plugins. You need to contact these plugins support to resolve all your issues.

    If you have any questions please feel free to contact us.

    Best Regards

    #396122

    ataub2qf
    Participant

    It is not about the plugins.

    It is about the styles the base theme embeds:

    <link rel='stylesheet' id='bootstrap-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/bootstrap.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-style-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/style.min.css?ver=6.0.1' type='text/css' media='all' />
    <link rel='stylesheet' id='child-style-css'  href='https://shop.feenstaub.at/wp-content/themes/basel-child/style.css?ver=5.1.1' type='text/css' media='all' />
    <link rel='stylesheet' id='vc_font_awesome_5_shims-css'  href='https://shop.feenstaub.at/wp-content/plugins/js_composer/assets/lib/bower/font-awesome/css/v4-shims.min.css?ver=6.9.0' type='text/css' media='all' />
    <link rel='stylesheet' id='vc_font_awesome_5-css'  href='https://shop.feenstaub.at/wp-content/plugins/js_composer/assets/lib/bower/font-awesome/css/all.min.css?ver=6.9.0' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-wp-gutenberg-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/wp-gutenberg.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-int-mc4wp-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/int-mc4wp.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-int-wpcf7-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/int-wpcf7.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-woo-int-stripe-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/woo-int-stripe.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-int-wpbakery-base-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/int-wpbakery-base.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-woo-base-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/woo-base.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-lib-owl-carousel-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/lib-owl-carousel.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-el-banner-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/el-banner.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-el-section-title-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/el-section-title.min.css?ver=5.6.1' type='text/css' media='all' />
    <link rel='stylesheet' id='basel-opt-scrolltotop-css'  href='https://shop.feenstaub.at/wp-content/themes/basel/css/parts/opt-scrolltotop.min.css?ver=5.6.1' type='text/css' media='all' />

    See also the attached screenshot. All the styles you embed in those parts are below the basel-child theme (highlighted in green), so erases all the settings made there.

    Attachments:
    You must be logged in to view attached files.
    #396207

    Hello,

    Please make the full backup of the staging site and delete all the plugins except these:

    Contact Form 7
    Mailchimp for WordPress
    Safe SVG
    Slider Revolution
    WooCommerce
    WPBakery Page Builder
    XTEMOS Post Types plugin

    Switch to the parent theme and I will check the issues.

    Best Regards

    #396371

    ataub2qf
    Participant

    No worries, I just solved it by splitting the standard code from your child theme.

    So this one works in my child-themes functions.php:

    add_action( 'wp_enqueue_scripts', 'basel_child_enqueue_styles', 1000 );
    function basel_child_enqueue_styles() {	
    	$version = basel_get_theme_info( 'Version' );
    	
    	if( basel_get_opt( 'minified_css' ) ) {
    		wp_enqueue_style( 'basel-style', get_template_directory_uri() . '/style.min.css', array('bootstrap'), $version );
    	} else {
    		wp_enqueue_style( 'basel-style', get_template_directory_uri() . '/style.css', array('bootstrap'), $version);
    	}
    }
    
    // Taubenkorb 2022-08-08 -> Embed after Pagecssfiles::hooks -> enqueue_page_css_files
    add_action( 'wp_enqueue_scripts', 'basel_child_enqueue_styles_feenstaub', 10101 );
    function basel_child_enqueue_styles_feenstaub() {	
        $version = basel_get_theme_info( 'Version' );		
        wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array('bootstrap'), $version, 'all');
    }

    So you can close this. Thx.

    #396439

    You are welcome! We are here to help.

    Wish you a wonderful day!

Viewing 9 posts - 1 through 9 (of 9 total)