• Resolved prakin

    (@prakin)


    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 file

    add_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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    3) add to the php file

    Make sure you’re adding that code between these characters:

    <?php
    
    ?>

    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 parent theme should just enqueue them automatically.

    Thread Starter prakin

    (@prakin)

    got it. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘change from @import to enqueue?’ is closed to new replies.