correct way to enqueue js and css files for wordpress shortcode?
A better approach would be to only enqueue the scripts and styles when you know the shortcode is actually being used on the page. One way to do this is to use the wp_enqueue_scripts action to check if the shortcode exists in any of the posts on the current page. If it does, then you … Read more