You can use wp_enqueue_script and wp_enqueue_style just after the following code add_action(‘widgets_init’, function(){ register_widget(‘calendar_widget’); }); You can add js/css like this function mg_scripts() { wp_enqueue_style( ‘style-name’, ‘/path/to/css’ ); wp_enqueue_script( ‘script-name’, ‘/path/to/js’, array(), ‘1.0.0’, true ); } add_action( ‘wp_enqueue_scripts’, ‘mg_scripts’ ); You can also call wp_enqueue_script and wp_enqueue_style directly inside widget function like this <?php /* … Read more