Child Theme

  • I am trying to create a Child theme. After haveing created and put in the coding in Style.css and functions.php. The style of the theme ‘twenty fifteen’ is still not loading properly.
    most places show @import way to enque styles but wordpress mentions another, supposedly better wat by putting in this

    <?php
    function my_theme_enqueue_styles() {

    $parent_style = ‘parent-style’; // This is ‘twentyfifteen-style’ for the Twenty Fifteen theme.

    wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array( $parent_style ),
    wp_get_theme()->get(‘Version’)
    );
    }
    add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
    ?>

    Still not working

    The blog I need help with is: (visible only to logged in users)

  • The topic ‘Child Theme’ is closed to new replies.