Home Forums WoodMart support forum setting child theme

setting child theme

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #303864

    sufcreate
    Participant

    hello

    I want to use a child theme and I’ve already looked at how to set it up. But when it comes to steps functions.php I don’t know what part of the code I need to change, please tell me.

    i see https://developer.wordpress.org/themes/advanced-topics/child-themes/

    add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
    function my_theme_enqueue_styles() {
    $parenthandle = ‘parent-style’; // This is ‘twentyfifteen-style’ for the Twenty Fifteen theme.
    $theme = wp_get_theme();
    wp_enqueue_style( $parenthandle, get_template_directory_uri() . ‘/style.css’,
    array(), // if the parent theme code has a dependency, copy it to here
    $theme->parent()->get(‘Version’)
    );
    wp_enqueue_style( ‘child-style’, get_stylesheet_uri(),
    array( $parenthandle ),
    $theme->get(‘Version’) // this only works if you have Version in the style header
    );
    }

    #303912

    Artem Temos
    Keymaster

    Hello,

    You can download the child theme from your account on ThemeForest. It lays in the main package archive along with the parent theme. And it contains all the necessary files and code.

    Kind Regards

Viewing 2 posts - 1 through 2 (of 2 total)