Chappy Tabby

2 possible problem and troubleshooting for WordPress custom theme

Monitor showing programming language photo (from unsplash)
Home »  Blog » WordPress » 2 possible problem and troubleshooting for WordPress custom theme

How to disable ‘style.min.css’ (for WordPress version 5.x)

The CSS file ‘style.min.css‘ is a new stylesheet for Gutenberg block editor.
It possibly causes some conflict with your custom theme since it is loaded after CSS file made for your theme.


Use the function ‘wp_dequeue_style‘ in functions.php to prevent ‘style.min.css‘ from loading.

add_action('wp_enqueue_scripts', 'remove_block_library_style');
function remove_block_library_style() {


I noticed that there is ‘wp_dequeue_stype’ in opposition to ‘we_enqueue_style’.

How to replace the other version of jQuery on WordPress

WordPress uses jQuery by default, version 1.12.4.

FYI the latest version of jQuery is 3.4.1.

It may make some troubles if you use the script or library for the latest version jQuery.


First, disable the default jQuery by using functions ‘wp_dequeue_script’, then ‘wp_deregister_script‘ in functions.php.
Next, use ‘wp_enqueue_script‘ function to enable jQuery what you want to load.
Last, set ‘add_action’ function to load this script after default scripts.

add_action('wp_enqueue_scripts', 'load_scripts', 100);
function load_scripts(){
  wp_enqueue_script('jquery', '', false, null, true);
  wp_enqueue_script('jquery-scrollto', '', false, null, true);
  wp_enqueue_script('ct-main-script', get_template_directory_uri() . '/js/main.js', false, null, true);


Inquire about WordPress

Related Posts