Enqueueing Scripts/Styles mid-page
Using wp_enqueue_* ‘in the body of the page’ (by which I really mean inside widget or shortocde callbacks) is an excellent way to ensure that scripts/styles are only loaded when they are needed (i.e. when the shortcode/widget is actually present on the page). Script/Styles Location Scripts and styles are then loaded either in the header … Read more