• PHBW

    (@phbw)


    Hi everybody,

    i try to import the style-child.css in the child-theme using funcions.php.

    Unfortunatly i have no idea why it doesn’t work and hope someone can help. Has someone a idea what I’m doing wrong?

    Here is the functions.php code:
    ——–
    <?php

    function theme_enqueue_styles() {

    wp_enqueue_style( ‘style’, get_template_directory_uri() . ‘../make/style.css’ );
    wp_enqueue_style( ‘style-child’, get_template_directory_uri() . ‘style.css’, array (‘style’)
    );
    }
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );

    ?>

    ——

    Header style-child.css

    /**
    * Theme Name: Make-Child
    * Theme URI: https://thethemefoundry.com/wordpress-themes/make/
    * Author: The Theme Foundry
    * Author URI: https://thethemefoundry.com
    * Description: Create your website without touching a line of code. Make’s flexible customization features and a powerful drag and drop page builder make designing your site fun and easy. Build almost anything: a simple portfolio or photography site, an ecommerce business site, a minimalist blog, or even a professional magazine. You’ll start by customizing your background, layouts, fonts, colors, and logo. Next, add and organize your content using the drag and drop page builder. Add a photo, a video, a gallery, or even a slider to any page on your website. Make is responsive, so your website will naturally look great on phones, tablets, and desktop screens. It’s also fully compatible with popular plugins like WooCommerce, Gravity Forms, Contact Form 7, Jetpack, and WP PageNavi.
    * Version: 1.4.4
    * License: GNU General Public License v2 or later
    * License URI: http://www.gnu.org/licenses/gpl-2.0.html
    * Text Domain: make-child
    * Domain Path: /languages/
    * Tags: black, blue, green, gray, orange, red, white, yellow, dark, light, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, fixed-layout, fluid-layout, responsive-layout, buddypress, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready, photoblogging
    * Template: make
    */

The topic ‘Enqueue stylesheet in child theme’ is closed to new replies.