How can i add some CSS to my wordpress plugin?

here is my first try around this forum, hope you’ll be able to give me … Read more How can i add some CSS to my wordpress plugin?

here is my first try around this forum, hope you’ll be able to give me a help ^^

So i create a wordpress plugin and i need to add some css style to my code. So i created a additionnal style-sheet and writed some css, then writed this in my php code to add and activate the css but nothing happened… Can you give me some keys please? Thanks a lot!

function add_css() {
    wp_register_style('style.css', plugins_url('style.css', __FILE__));
    wp_enqueue_style('style.css');
}

add_action('wp_enqueue_scripts', 'add_css');

Source: CSS – Stack Overflow


Categories: NewsTags: , ,

Leave a Reply

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