This topic has 4 replies, 2 voices, and was last updated 5 months, 1 weeks ago ago by Luca Rossi
Hi,
in child theme functions.php
“add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’, 1001 );
function theme_enqueue_styles() {
etheme_child_styles();
}”
so I cannot define version of css.
usually I use :
define(“CHILD_THEME_VERSION”, “1.0.2”);
function child_enqueue_styles()
{
wp_enqueue_style(“benjaminb-theme-css”, get_stylesheet_directory_uri() . “/style.css”, [“parent-theme-css”], CHILD_THEME_VERSION, “all”);
}
add_action(“wp_enqueue_scripts”, “child_enqueue_styles”, 15);
Is there any way we can pass this CHILD_THEME_VERSION into etheme_child_styles();
etheme_child_styles(); does not allow var to be passed ?
thank you
Hi @Gbp,
Please add the following code to functions.php file locates in your child theme:
function etheme_child_styles() {
// files:
// parent-theme/style.css, parent-theme/bootstrap.css (parent-theme/xstore.css), secondary-menu.css, options-style.min.css, child-theme/style.css
$theme = wp_get_theme();
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
// array('parent-style', 'bootstrap'),
array( 'etheme-parent-style' ),
CHILD_THEME_VERSION
);
}
Hope it helps!
Thank you
I’ll test
Let us know how it goes!
Best Regards,
The 8Theme Team.
You must be logged in to reply to this topic.Log in/Sign up