Skip to main content
1 of 2
Doug
  • 139
  • 1
  • 8

How to get DEFER or ASYNC attribute to appear when I add a stylesheet with wp_enqueue_style from a plugin?

Almost all of my CSS and JS resources can be postponed with an ASYNC or DEFER tag added to the resource. This may improve performance of my page load times considerably. However, I don't know how to specify these attributes to be added to the HEAD when wp_enqueue_style() takes care of adding them. It doesn't seem like wp_enqueue_style() takes a parameter for extra attributes. Is there another way?

Doug
  • 139
  • 1
  • 8