Access our premium support and let us know your problems, we will help you solve them.

0
No products in the cart.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: How To Include CSS and jQuery in my WordPress plugin? #10002
    blankbikesh-m
    Participant

    First you need to register the style and css using wp_register_script() and wp_register_style() functions

     //registering javascript and css
     wp_register_script ( 'mysample', plugins_url ( 'js/myjs.js', __FILE__ ) );
     wp_register_style ( 'mysample', plugins_url ( 'css/mystyle.css', __FILE__ ) );
    

    After this you can call the wp_enqueue_script() and wp_enqueue_style() functions for loading the js and css in required page

    wp_enqueue_script('mysample');
    wp_enqueue_style('mysample');
    

    I fount a nice example here http://wiki.workassis.com/wordpress-create-advanced-custom-plugin-using-oop/

Viewing 1 post (of 1 total)