Ready to get started?Download WordPress


WordPress add style to plugins (1 post)

  1. girll
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic