WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have jquery file like as follows


I want to include these files into my plugin... if anyone have solution for how to include above mentioned file into wordpress plugin then tell me....

please.... thank you in advance

share|improve this question
Where will these files be used? Front end or backend? – Rutwick Gangurde Jun 20 '12 at 6:03

You should use this snippet inside your function:

wp_register_style('mycss', WP_PLUGIN_URL . '/whatever.css');

Then you add this add_action after your function, to call your the CSS in the :

add_action ( 'wp_head', 'your_function_name');

For javascript, use wp_register_script() and wp_enqueue_script() instead.

WordPress function reference: wp_enqueue_style and wp_enqueue_script

share|improve this answer
Wrong way bro... This is now deprecated, should be done using the wp_enqueue_script action hook. – Rutwick Gangurde Jun 20 '12 at 6:04

Add this function to Your plugin-name.php file and before you do that change css and js directory

 function my-plugin(){





    add_action('wp_enqueue_scripts','my-plugin');   //for Backend , use only one because your question is limited
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.