change from @import to enqueue?
-
Ok. I am using the Sela theme, and my child theme currently just has a .css file and a footer.php file.
Right now I have my .css set up as/*
Theme Name:Sela Theme Child
Theme URI: https://www.queenbeeofhoneydos.com
Template: sela
Description: This is a child theme of Sela
Author: Rachel Akin
Author URI: https://www.queenbeeofhoneydos.com
Version: 1.0.0
*/@import url(“../sela/style.css”);
I am seeing that I should change over to enqueue to get the parent .css stylesheet, and I want to make sure that I am clear on the process.
From what I gather I should
1)delete the @import”../sela/style.css”);
2) create a php file
3) add to the php fileadd_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
}4) also my parent theme has a rtl.css and an editor-style.css, so am I suppose to create a file for each of these in the child theme as well?
- The topic ‘change from @import to enqueue?’ is closed to new replies.