admin管理员组

文章数量:1417419

Is it possible to have css and js scripts outside of template directory? If it is possible, how can I achieve it?

Basically, instead of having:

.css

I want to have:

.css

Is it possible to have css and js scripts outside of template directory? If it is possible, how can I achieve it?

Basically, instead of having:

http://example/wp-content/themes/mytheme/assets/mystyle.css

I want to have:

http://example/assets/mystyle.css
Share Improve this question edited Aug 10, 2019 at 14:08 dodo254 asked Aug 8, 2019 at 14:14 dodo254dodo254 1617 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Yes, you can enqueue JS and CSS from anywhere - even other sites. However, your theme will have to have a "style.css" with at minimum the required comments for WP to recognize it as a theme that can be activated.

本文标签: Changing URL of scriptsscripts outside theme folder