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

#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.