Support » Theme: Fukasawa » Use of Genericons is 404 in child themes

  • Resolved Chris Hardie


    The two calls to wp_register_style in functions.php for loading Genericons use get_stylesheet_directory_uri(). This works if you use Fukasawa directly, but if you make a child theme of Fukasawa, it makes the reference relative to the current theme folder, and results in a 404 not found error (assuming the child theme does not also have the genericons folder in place).

    I tested replacing these calls with get_template_directory_uri() which will always refer to the parent theme’s folder, and that seems to fix the issue in my child theme.

    As a short term fix, I’ve added the style registrations in my child theme:

    	wp_register_style( 'fukasawa_genericons', get_template_directory_uri() . '/genericons/genericons.css' );
    	wp_register_style( 'fukasawa-block-editor-styles-genericons', get_stylesheet_directory_uri() . '/genericons/genericons.css' );

    Would you consider updating these calls in the main theme? Thanks.

    • This topic was modified 2 years, 6 months ago by Chris Hardie.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Use of Genericons is 404 in child themes’ is closed to new replies.