• What’s the proper way to attach the parents stylesheet to the child theme.

    I’ve done this in the past with @import. I have also read recent tutorials on wpbeginner suggesting the same (other places also). Also, I have downloaded various child themes for twentyfourteen from wordpress.org and they all use @import.

    However, the codex says you should use the wp_enqueue_style() .

    Which is proper? Thanks.

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

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    It says wp_enqueue_style in Codex because that covers a wider range of people. The reason being that some themes don’t just have 1 stylesheet, they have multiple that are enqueued at different times. The example in Codex allows you to enqueue your Child Theme stylesheet right at the end of the queue, which is a good thing.

    You don’t have to worry about that for the Twenty Fourteen theme. Just use @import.

    Thread Starter WPWanderer

    (@wpwanderer)

    Great explanation. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Child theme question..’ is closed to new replies.