Problem with css-version of childthem
-
Hi,
I am problably just making a stupid mistake, hope you people can help me.
I want to add a version to my childtheme’s css-link, but it looks like a older timestamp is already added by the parent theme?this is how I enqueue the styles in my functions:
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { $theme = wp_get_theme(); wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), $theme->get('Version') ); }So what I expect to see is ?v=1.0.1 or something like that.
What I get is ?ver=20190507What I see in the functions.php of the parent theme (twentyseventeen) is:
// Theme stylesheet. wp_enqueue_style( 'twentyseventeen-style', get_stylesheet_uri(), array(), '20190507' );But why would this effect the link to child-theme style instead of that of the parent theme???
And ho do I get rid of that and replace it with the current version?Please someone point me in the right direction…
- This topic was modified 6 years ago by . Reason: edited out tying mistakes, and tried to make a sentence a bit cleare
The page I need help with: [log in to see the link]
The topic ‘Problem with css-version of childthem’ is closed to new replies.