wordpress child theme multiple child theme wp_enqueue_scripts

I can’t get my wp_enqueue_scripts working for multiple child style sheets. I have

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function 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',
    get_stylesheet_directory_uri() . '/anthony.css',
        array('parent-style')
);
    }

I’m not too familiar with php. How do I include multiple stylesheets?

Related posts

Leave a Reply

1 comment

  1. You should only call one stylesheet each time you use wp_enqueue_style()

    // start the function called theme_enqueue_styles
    function theme_enqueue_styles() {
    
        // enqueue 3 stylesheets, call wp_eunqeue_style for each file
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css') ;
        wp_enqueue_style( 'anthony-style', get_stylesheet_directory_uri() . '/anthony.css' );
    }
    
    // Call the wp_enqueue_scripts action on the created function
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );