Changes in enqueued / registered stylesheet paths not updating—why?

At long last, I have identified the issue. The theme I was working in used the Minikit theme starter, which has a function that strips version numbers. function minikit_remove_wp_ver_css_js($src) { if (strpos($src, ‘ver=”)) $src = remove_query_arg(“ver’, $src); return $src; } Naturally, the version numbers returned once I stopped calling this function.

Child theme style.css versioning

Are you sure the version is included in style.css in the right way? In that case this should really work (hook with wp_enqueue_scripts): $theme_data = wp_get_theme(); wp_register_style(‘your-style-handle’, get_template_directory_uri() . ‘/style.css’, ”, $theme_data[‘version’], ‘all’); wp_enqueue_style(‘your-style-handle’); While developing you may not want to change the file version in style.css all the time, in which case you could … Read more

Using multiple versions of jQuery while still calling it like WP likes

I found that it was better for me to use the latest jQuery version (which WordPress loads by default) and to treat the incompatibility issue by modifying the JS plugin files that were incompatible with the latest jQuery version. Note: The reason I chose this solution is because in most cases, JS plugin incompatibility with … Read more

Register script/style: Is it possible to customize the version query string via plugin?

Old answer (based on misconception that you wanted a cache buster): You can use add_query_arg() which adds/replaces query arguments. <?php /** * Plugin Name: wpse_84670 * Version: 0.0.1 * Description: replace script/style version with time as a cache buster */ /** * replace script or stylesheet version with current time * @param string $url the … Read more

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