• Resolved jeja7

    (@jeja7)


    Hey Andrii,

    I’m creating a child theme manually (for the first time), following wp codex instructions and not quite sure if the following code for Bento child functions.php is correct and enough.
    Grateful for advice.

    Thank Youuu! ??

    <?php
    function bento_child_enqueue_styles() {
    
        $parent_style = 'bento-theme-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_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'bento_child_enqueue_styles' );
    ?>
    • This topic was modified 7 years, 7 months ago by jeja7.
    • This topic was modified 7 years, 7 months ago by jeja7.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bento child’ is closed to new replies.