0 points

Child Theme Functions.php Initialization


dashboard

Wed Aug 26 2020 16:08:48 GMT+0000 (UTC)

Posted by @shm1ckle #php #wordpress

<?php

add_action('wp_enqueue_scripts', 'my_theme_enqueue_styles');

function my_theme_enqueue_styles()
{
    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_enqueue_script('custom-script', get_stylesheet_directory_uri() . '/path/to/script.js', '', '', true );
}
content_copy Copy