0

I have a plugin that has it's own CSS for the content generated when you use the associated short codes. I am trying to create a theme to re-style the front end of my site but as this plugin has its own CSS how can i modify it from within my new theme?

  • Could you rephrase your question? At least to me it's a bit hard to understand what your goal is and which problems you are facing. – kaiser Jan 2 '15 at 14:57
  • CSS styles can be overwritten in various ways. Use the plugin's generated classes and style them in your theme with !important, but it's not a good practice in mass edit you know. Anyways, it's not a WordPress related question to me, it's rather a CSS related question only. – Mayeenul Islam Jan 2 '15 at 15:25
  • As you said its not good to overwrite massive amounts of styling so is it not possible just to change everything else on the page? – Jesse Orange Jan 2 '15 at 15:29
0

Your two options are to add your own stylesheet to redefine the plugin's styles, or remove the plugin's css file entirely by dequeueing the stylesheet (assuming the plugin has correctly added the stylesheet via the API)

function wpd_my_theme_css() {
    // dequeue plugin css with same handle it is enqueued with
    wp_dequeue_style( 'plugin_css_handle' );
}
// priority must by a higher number than the css is added on
add_action( 'wp_enqueue_scripts', 'wpd_my_theme_css', 9999 );

You'll have to look at the specific plugin's code for a definitive answer on what's possible here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.