• Resolved lightwavin

    (@lightwavin)


    Hi,

    Is it possible to use code snippets to override the css of a plugin?

    I have tried adding some css to hide some plugin styling but it doesn’t appear to be having any effect.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    It should be possible. What code are you currently using?

    Thread Starter lightwavin

    (@lightwavin)

    Hi Shea,

    Thanks for the quick reply. I am not a coder, so not sure if using it correctly – I am using this:

    add_action( ‘wp_head’, function () { ?>
    <style>

    .pmpro_admin .pmpro_banner {
    display: none !important;
    }
    </style>
    <?php } );

    Plugin Author Shea Bunge

    (@bungeshea)

    The wp_head action hook only works on the site front-end. You’ll need to use the admin_head hook for the administraton area:

    add_action( 'admin_head', function () { ?>
    <style>
    
    .pmpro_admin .pmpro_banner {
    	display: none !important;
    }
    
    </style>
    <?php } );
    Thread Starter lightwavin

    (@lightwavin)

    Beautiful, that worked perfectly – thank you!

    Plugin Author Shea Bunge

    (@bungeshea)

    Good to hear!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Override plugin css’ is closed to new replies.