• I used Create Block Theme to create a child theme of the default twentytwentythree block theme.

    I uploaded and activated my new child theme.

    I used Create Block Theme’s Font Management feature to add the Google font Montserrat, weight 700. This uploaded the font asset to wp-content/themes/child/assets/fonts/montserrat_normal_700.ttf, as expected.

    However, the CSS being generated uses the parent theme’s path for the URL instead of the child, so the browser can’t load the font and it is not rendered.

    @font-face {font-family: 'Montserrat';src: url(https://test.example.org/wp-content/themes/twentytwentythree/assets/fonts/montserrat_normal_700.ttf);font-weight: 700;font-style: normal;}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘wrong asset path for uploaded font in child theme’ is closed to new replies.