Problem loading .css
-
Hi veryone!
Im developing a site on local with a child theme and in my child’s theme functions.php i got it registered
function avada_child_scripts() { wp_enqueue_style( 'avada-child-stylesheet', get_template_directory_uri() . '/style.css', array()); } add_action('wp_enqueue_scripts', 'avada_child_scripts');
So far so good, problem starts when i try to rename the css to style_es.css
the page doesnt load child’s css (I’ve changed from /style.css to /style_es.css inside the function.php)My objetive is loading diffferent css depending on web language so im assuming that the code should be this one:
function avada_child_languages_scripts() { if ( ICL_LANGUAGE_CODE=='es' ) { wp_enqueue_style( 'avada-child-stylesheet', get_template_directory_uri() . '/style_es.css', array()); } else{ wp_enqueue_style( 'avada-child-stylesheet', get_template_directory_uri() . '/style_en.css', array()); } } add_action('wp_enqueue_scripts', 'avada_child_languages_scripts');
Also this is what i got on child css
/*
Theme Name: Avada Child
Description: My style sheet
Author:Me
Template: Avada
*/But it isnt working , what am i doing wrong?
thx everyone 🙂
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Problem loading .css’ is closed to new replies.