WordPress.org

Support

Support » Plugins and Hacks » WordPress add style to plugins

WordPress add style to plugins

  • Hi all.
    I want to add style to plugin that will not be dependant on other stylesheets. That’s why I write so:

    add_action( 'admin_enqueue_scripts', 'prefix_add_my_stylesheet_img' );
        function prefix_add_my_stylesheet_img() {
            wp_register_style( 'prefix-style_img', plugins_url('style.css', __FILE__), false );
            wp_enqueue_style( 'prefix-style_img', false );
        }

    As I know if I give 3rd parameter’s value “false”, it must not be dependant on other stylesheets. But it is. What is wrong? How to solve this problem?

  • The topic ‘WordPress add style to plugins’ is closed to new replies.