Please confirm exact code in two Child Theme files

This topic has 2 replies, 2 voices, and was last updated 8 years, 5 months ago ago by Jack Richardson

  • Avatar: ArthurAnn
    ArthurAnn
    Participant
    November 3, 2015 at 15:02

    Hello,

    Please confirm that the code below is the exact code to be put in the two Child Theme files. I have searched for 2 hours and you never say, and the one time you did I think you left out the opening PHP code. Please just confirm that this is the exact, only code. It would be cool to just make the Child theme in a .zip file with the theme. Thanks.

    style.css-

    /*
    Theme Name: Legenda Child
    Theme URI: https://www.8theme.com/
    Description: Legenda Theme
    Template: legenda
    Version: 1.0.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: legenda-child
    */

    functions.php-

    <?php

    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );

    }
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );

    1 Answer
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    November 3, 2015 at 16:22

    Hello,

    The code for style.css is correct.
    The code for functions.php is:

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

    Best regards,
    Jack Richardson.

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.