dxw / govuk-theme

A WordPress theme implementing the GOV.UK design system
MIT License
17 stars 7 forks source link

Always load this theme's JS & CSS assets from itself #20

Closed RobjS closed 3 years ago

RobjS commented 3 years ago

Before: we loaded the CSS & JS using get_stylesheet_directory_uri(). This meant that when this was a parent theme, those files tried to load from within the child theme.

Now: we load them using get_template_directory_uri(). That means they load from this theme (as the parent), and don't have to be re-enqueued in the child theme.