creating child theme, some scripts and css file not loaded

107 Views Asked by At

I'm creating a child theme for an active template. have this code in functions.php file at child folder.

 <?php
  add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
  function enqueue_parent_styles() {
   wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
  }
  ?>

but some of js and css files of a plugin named lightgallery haven't loaded when child theme is active. and has 404 error at console. the url of 404 is like this:

  wp- 
content/themes/sampletheme-child/assets/plugins/LightGallery/assets/css/lightgalle 
      ry.css 

I haven't such a folder in child theme and it is searching it in child theme.I don't know why it doesn't read it from parent theme.

what should I do to load this files?

--ps: another issue is when the child theme is activated the theme is ltr. and the style is not perfect, although the main styles of the themplate has been loaded and I didn't found any rtl style at parent theme. but in parent style every thing is fine and rtl.

0

There are 0 best solutions below