How To Include CSS and jQuery in my wordpress plugin?

What i’ve read at this morning is How To Include CSS and jQuery in my wordpress plugin?

And here the Answer

function your_css_and_js() {
wp_register_style('your_css_and_js', plugins_url('style.css',__FILE__ ));
wp_enqueue_style('your_css_and_js');
wp_register_script( 'your_css_and_js', plugins_url('your_script.js',__FILE__ ));
wp_enqueue_script('your_css_and_js');
}
add_action( 'admin_init','your_css_and_js');

source

 

Bacaan lainnya: tutplus

Leave a Reply

Your email address will not be published. Required fields are marked *