enqueue parent js style
-
Hello.
using newspress theme with child theme.
in the dev console i get this errors:
style.min-rtl.css:1 Failed to load resource: the server responded with a status of 404 ()
theme.min-rtl.css:1 Failed to load resource: the server responded with a status of 404 ()
jquery-migrate.min.js:2 JQMIGRATE: Migrate is installed, version 1.4.1
style.min-rtl.css:1 Failed to load resource: the server responded with a status of 404 ()
theme.min-rtl.css:1 Failed to load resource: the server responded with a status of 404 ()my child theme doesn’t load the CSS files from the parent JS directory
my functions.php
<?php
// Exit if accessed directly
if ( !defined( ‘ABSPATH’ ) ) exit;// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED – Do not modify or remove comment markers above or below:if ( !function_exists( ‘chld_thm_cfg_parent_css’ ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( ‘chld_thm_cfg_parent’, trailingslashit( get_template_directory_uri() ) . ‘style.css’, array( ‘fontawesome’,’newspaperss_core’ ) );
}
endif;
add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’, 10 );if ( !function_exists( ‘child_theme_configurator_css’ ) ):
function child_theme_configurator_css() {
wp_enqueue_style( ‘chld_thm_cfg_separate’, trailingslashit( get_stylesheet_directory_uri() ) . ‘ctc-style.css’, array( ‘chld_thm_cfg_parent’,’newspaperss-style’,’kirki-styles-newspaperss’ ) );
}
endif;
add_action( ‘wp_enqueue_scripts’, ‘child_theme_configurator_css’, 20 );// END ENQUEUE PARENT ACTION
wp_style_add_data( ‘themeslug-style’, ‘rtl’, ‘replace’ );
what I’m doing wrong?
- The topic ‘enqueue parent js style’ is closed to new replies.