The wordpress theme I bought has some jQuery UI styling included in its default CSS file. The problem is I have a plugin that uses jQuery UI and the theme's default CSS makes the plugin corrupted. I want the default jquery UI CSS file to override UI styling contained in my theme's CSS file.
I see some people mentioned using Enqueue to make the jQuery CSS load in the bottom of the page, but I don't know how to do this. Thanks.

  • 1
    Well, be careful. If the theme's CSS can break the plugin's CSS then the reverse it true as well. Loading the plugin's CSS late could well make that happen. You are better off figuring out why the two stylesheets conflict and altering one or both so that they cooperate. Unfortunately, that makes this a CSS question which is off topic here per the faq.
    – s_ha_dum
    Commented Jan 17, 2013 at 21:18
  • Hi, thanks for your reply. Why is it off topic? What I am asking is how to enqueue the jquery UI CSS file so it loads at the very end of my document on my plugin page, I believe that should do the trick.
    – b0nd
    Commented Jan 17, 2013 at 21:32
  • It is only off topic if you take my advice and edit the CSS to make them cooperate. That was conditional. Pure CSS questions are off topic.
    – s_ha_dum
    Commented Jan 17, 2013 at 21:38

2 Answers 2


You want the plugins style sheet to over ride your themes style sheet conditionally ( on one page).

Dequeue your themes style sheet for a specific page conditionally.

add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 25 );

function remove_default_stylesheet() {

if ( is_page( page id or slug) ) {

wp_dequeue_style( 'original-enqueue-stylesheet-handle' );
wp_deregister_style( 'original-register-stylesheet-handle' );

wp_register_style( 'new-style', plugins_url('stylesheet.css', __FILE__) );  
wp_enqueue_style( 'new-style' );



You might be able to try something like this in your footer:

function my_scripts_method() {
    wp_enqueue_script('<script name>','<script source>');            

add_action('wp_enqueue_scripts', 'my_scripts_method'); // For use on the Front end (ie. Theme)

Where <script> is the name of the script and <script source> is where it lives within your WP install.

If that doesn't help, maybe some of the other coding on the WP Codex page might help, wp_enqueue_script

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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