0

Is there a way to enqueue only plugin styles and scripts without wp_head? I have a plugin I'm working on which overrides the page template, but I still want to include all other plugins without including the theme style. Since theme developers don't always enqueue their styles and often hardcode the link, what's the best way around this?

2 Answers 2

1

Since theme developers don't always enqueue their styles and often hardcode the link, what's the best way around this?

There is no way around this. Simply said: Let them burn. They're doing it wrong and as a 3rd party code developer you don't have to take wannabe developers into account.

0

Well I had a similar issue this wont help if people have been arseholes and manually added script and style links but will hopefully help with those that are.

Styles and Scripts, Selectively enqueue across entire site

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.