I've created a child theme of TwentyTwelve.
On the front end, the <head>
section contains the line:
http://example.com/wp-content/themes/childtheme/style.css?ver=3.8.1
Any changes I make to childtheme/style.css
are not reflected in http://example.com/wp-content/themes/childtheme/style.css?ver=3.8.1
I've performed a search in TwentyTwelve and childtheme, and can't find any instance of enqueue_style which contains a version of 3.8.1, or any hard coding of style.css?ver=3.8.1
How do I either:
- Update style.css?ver=3.8.1
- or force the site to use http://example.com/wp-content/themes/childtheme/style.css instead of .../style.css?ver=3.8.1
Thanks
Update:
I added the following to .../childtheme/functions.php
function add_require_scripts_files() {
wp_enqueue_style('layout', get_stylesheet_directory_uri().'/style.css', array(), '1.0.0', "all");
}
add_action( 'wp_enqueue_scripts', 'add_require_scripts_files' );
But the front end contains code:
<link rel='stylesheet' id='layout-css' href='http://example.com/wp-content/themes/childtheme/style.css?ver=1.0.0' type='text/css' media='all' />
<link rel='stylesheet' id='twentytwelve-style-css' href='http://example.com/wp-content/themes/childtheme/style.css?ver=3.8.1' type='text/css' media='all' />
style.css?ver=3.8.1 is overriding style.css?ver=1.0.0
Update 2:
In /childtheme/functions.php, I replaced
function add_require_scripts_files() {
wp_enqueue_style('layout', get_stylesheet_directory_uri().'/style.css', array(), '1.0.0', "all");
}
with
function add_require_scripts_files() {
wp_enqueue_style('twentytwelve-style', get_stylesheet_directory_uri().'/style.css', array(), '1.0.0', "all");
}
which meant the style.css?ver=3.8.1 was not loaded.
3.8.1.
is the current version of your WordPress install, which is used if you don't specify a version yourself. See this.