wpengine / frost

The ultimate WordPress block theme for website designers and developers.
https://wordpress.org/themes/frost/
GNU General Public License v3.0
573 stars 149 forks source link

[Feature Request] Replace get_template_directory_uri() functions #169

Closed timofey-drozhzhin closed 7 months ago

timofey-drozhzhin commented 7 months ago

Is your feature request related to a problem? Please describe.

When running Frost as a child theme, it loads styles from a parent theme, instead of the current theme directory.

Describe the solution you'd like

get_template_directory_uri() function needs to be replaced with get_theme_file_uri() or get_stylesheet_directory_uri() to always load the style.css from the current theme.

How to replicate the issue

To replicate the issue, add Template: twentytwentyfour into the header of style.css file. The theme will attempt to load the stylesheet from the twentytwentyfour theme, instead of the current theme.

timofey-drozhzhin commented 7 months ago

After analyzing other FSE themes, it seems that the get_template_directory_uri() function is typically used in this situation, especially since this theme is not designed to be used as a child. Closing the issue.