Load custom css after bootstrap

The above looks correct, however, you need to specify your script to enqueue after bootstrap by adding the bootstrap-min handle to the third, dependencies parameter. function register_css() { wp_register_style( ‘bootstrap-min’, get_template_directory_uri() . ‘/css/bootstrap.min.css’ ); wp_register_style( ‘custom-css’, get_template_directory_uri() . ‘/css/custom.min.css’, ‘bootstrap-min’ ); wp_enqueue_style( ‘bootstrap-min’ ); wp_enqueue_style( ‘custom-css’ ); } add_action( ‘wp_enqueue_scripts’, ‘register_css’ ); See wp_register_style for … Read more

Override Theme CSS with CSS from a plugin

You can try to dequeue the plugin stylesheet, then re-enqueue the stylesheet with your theme stylesheet added as a dependency which will ensure that the plugin stylesheet is loaded after your theme stylesheet. function custom_style_order() { if ( defined(‘JOB_MANAGER_PLUGIN_URL’) ) { //dequeue the original plugin stylesheet by its handle wp_dequeue_style( ‘wp-job-manager-frontend’ ); //re-enqueue the stylesheet … Read more

Understanding child theme functions.php

What I read is that the parent css was loaded after the child, so the last one wins It depends on the order in which theme developer is loading stylesheets. Normally WordPress loads child theme’s functions.php first and then parent theme’s functions.php. the parent Emmet theme uses CSS files called differently than Style.css Yes it … Read more

Prevent CSS/JS loading when plugin is not used

You need to use action wp_enqueue_scripts except wp_head like: function inf_remove_junk() { if (!is_admin()) { wp_dequeue_style(‘js_composer_front’); wp_dequeue_style(‘js_composer_custom_css’); wp_dequeue_script(‘wpb_composer_front_js’); } } add_action( ‘wp_enqueue_scripts’, ‘inf_remove_junk’ ); But it remove the scripts from front end. I think on archive pages VC does not execute it’s shortcode. So you can check is_archive() condition instead of is_admin(). Or you can … Read more

WordPress doesn’t include css

You’ve placed the relevant code inside function.php, but WordPress loads functions.php You’re also missing some indenting which makes syntax errors much more likely to occur, and you can save some typing by using get_stylesheet_uri() instead of get_template_directory_uri().’/style.css’

Writing Clean WooCommerce Styles

What i do is, disable Woocommerce default styles depending on what i want to customize, instead of overwriting the css. Woocommerce loads 3 styles by default: woocommerce-general.css woocommerce-layout.css woocommerce-smallscreen.css If you want to fully customize you can disable all styles or, just the ones that you dont want by adding: // Remove each style one … Read more

Woocommerce checkout fields on the same line

Add custom CSS using custom style editor, for below classes and IDs .woocommerce-billing-fields__field-wrapper { display: flex; flex-wrap: wrap; } .woocommerce form .form-row { display: inline-block; } .woocommerce form .form-row input.input-text { max-width: 252px; } #billing_first_name_field { order: 1; } #billing_last_name_field { order: 2; } #billing_company_field { order: 3; } #billing_country_field { order: 4; } #billing_address_1_field … Read more