Support » Requests and Feedback » Theme Handbook – Block theme setup – Issue in example code

  • Relevant link

    As of the time of writing, the page has code towards the bottom containing the following array declaration:

    
    $args = array(
        'handle' => "myfirsttheme-$block_name",
        'src'    => get_theme_file_uri( "assets/css/blocks/$block_name.css" ),
        $args['path'] = get_theme_file_path( "assets/css/blocks/$block_name.css" ),
    );
    

    I think the last element (“path”) is written incorrectly. It seems like it should be:

    
    $args = array(
        'handle' => "myfirsttheme-$block_name",
        'src'    => get_theme_file_uri( "assets/css/blocks/$block_name.css" ),
        'path'   => get_theme_file_path( "assets/css/blocks/$block_name.css" ),
    );
    

    The page I need help with: [log in to see the link]

  • You must be logged in to reply to this topic.