You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use get_stylesheet_uri(): this would allow child themes to work and allow users to customize the location of the stylesheet (we usually keep it stored in an assets/css directory).
Use get_stylesheet_directory() . '/style.css': this is still a bit restrictive, but would allow the style.css file to either be from the child or current theme. Since child themes require a style.css file, this should always be present when using a child theme.
The text was updated successfully, but these errors were encountered:
@kopepasah Please give #887 a try. It tries to make enqueueing CSS much more seamless. The only requirement is that you enqueue CSS that exists on the filesystem in a theme/plugin, wp-admin, or wp-includes. It also handles added inline styles, locale stylesheets, and Custom CSS.
Currently, there is no way to use a child theme with AMP due to the hard coded
get_template_directory() . '/style.css'
.https://github.com/Automattic/amp-wp/blob/89e4227edf41a8fe0408e8e855a6dcbbd4ccc13c/includes/class-amp-theme-support.php#L391
As I can see it, there are two options:
get_stylesheet_uri()
: this would allow child themes to work and allow users to customize the location of the stylesheet (we usually keep it stored in anassets/css
directory).get_stylesheet_directory() . '/style.css'
: this is still a bit restrictive, but would allow thestyle.css
file to either be from the child or current theme. Since child themes require astyle.css
file, this should always be present when using a child theme.The text was updated successfully, but these errors were encountered: