• Resolved victorp_sg

    (@victorp_sg)


    I am new to WordPress but has been reading up extensively to setup a site. One of the things that I have decided on is to use a child theme as I foresee that in the long run that there may be customisation to the theme styles and templates.

    The provided Mesocolumn child theme uses the older method of “@import” to load the parent style sheet. Since WordPress has deprecated that method, what should I put into functions.php in the child theme to load in responsive.css and rtl.css using the recommended method (which only loads style.css)?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter victorp_sg

    (@victorp_sg)

    Based on previous posts from others, will the following functions.php work with loading style.css, responsive.css and rtl.css:

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'parent-responsive-style', get_template_directory_uri() . '/responsive.css' );
        wp_enqueue_style( 'parent-rtl-style', get_template_directory_uri() . '/rtl.css' );
    }
    Theme Author Richie KS

    (@rkcorp)

    this should be sufficient, no need to recall the responsive and rtl css.

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
       wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to code functions.php for Mesocolumn child theme?’ is closed to new replies.