Reply 145280 to: Correct way to implement child theme with xstore? Style problem etc

Avatar: Olga Barlow
Olga Barlow
Support staff
November 8, 2016 at 14:48

Hello,

We have included child theme archive into theme package. Use it to install child theme.

functions.php of xstore child theme should have the following code at the beginning

<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css', array('bootstrap'));
    

    if ( is_rtl() ) {
    	wp_enqueue_style( 'rtl-style', get_template_directory_uri() . '/rtl.css');
    }

    wp_enqueue_style( 'child-style',
        get_stylesheet_directory_uri() . '/style.css',
        array('parent-style', 'bootstrap')
    );
}

Regards

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.