• Hello,
    i am a bit confused with child theme method. im trying to load parent theme style using following code in my child themes function.php. this example i took from a blog

    add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
    
    function enqueue_parent_styles() {
       wp_enqueue_style( '<strong>parent-style</strong>', get_template_directory_uri().'/style.css' );
    }
    
    now i

    m confused with this ‘parent-style’. is this will be the folder name of my child theme?

    thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hmm, Im a bit confused as well! Try following this guide to setting up a child theme. You may be over complicating matters. Basically, a child them is a folder in your theme directory that points to your original “parent” theme. You do this by adding a style.css file to the child theme folder with a commented section directing the child theme to the parent theme. You do not need to modify the functions.php file. The link I added goes into more detail.

    https://developer.ww.wp.xz.cn/reference/functions/wp_enqueue_style/

    'parent-style' is kind of a name for this stylesheet – you could use any name as long as it is unique …

    Thread Starter tarek

    (@mrcmanager)

    hello,
    thanks for the reply.

    so its nothing to do with the child theme folder name? i mean its not commendatory to make it same as child theme folder name.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Creating child theme’ is closed to new replies.