JQuery conflicts in WordPress plugins and themes

A theme was breaking because of a jQuery conflict with a plugin. I was using the GD Star Rating plugin and I was using the Studio Box theme from imaginem. I finally found the solution.

Now remember, I can barely spell JQuery, but I knew that’s where the conflict was. There was lots of talk about JQuery NoConflict and wrapping your JQuery and it was pretty much all Greek Geek to me. Finally I came across a comment near the bottom of the How to include JQuery on your WordPress theme post where the commenter said to put this in between your “head” tags in your header.php file:

if this doesn’t work:
<code><?php wp_enqueue_scripts(“jquery”); ?></code>

you can try this:
<code><?php wp_print_scripts(“jquery”); ?></code>

[You don't need the bracketed "code" tags in there, it's just so I can show code here.] That beautiful accordion slider was working again. Living together in harmony with GD Star Rating.

email

About Bradley Charbonneau

I've done the big corporate thing. I've done the creative writer thing. Now I'm happily in the middle. I like to help small businesses who are interested in "working their website before their website works them." I'm also interested in creating beautiful sites with powerful WordPress themes.

Want More?

Want to get the latest on WordPress design, development, and deliciousness? Sorry, needed a "d" word. Enter your email and you'll be updated with news as it happens.

, , , ,

3 Responses to JQuery conflicts in WordPress plugins and themes

  1. Erin February 8, 2011 at 6:33 am #

    Bradley, I am struggling with a very similar problem for weeks now, site launch has been put on hold, hair has been pulled out, and sleep has been lost.

    Templatic’s Real Estate theme is conflicting with GD Star Ratings, WP PostRatings, Contestant Ratings, and ANY star ratings plugin I have tried.

    I tried your solution, putting the lines of code in the header but it did not work.

    Can you suggest anything? Appreciate any help you can give! Thank you.

    • Bradley Charbonneau February 8, 2011 at 6:38 am #

      Hi Erin,

      Just double checking, but you’re not putting in the bracketed “” in there, right?

      If you’re using a framework (I’m assuming Templatic is a framework?) maybe it has to go in the header.php file of the framework? I’m just guessing, of course. Or maybe the Templatic folks have an idea?

      See if any of that helps and please post back here with results–or at least comments!

  2. Dario June 15, 2011 at 10:11 am #

    Hi!
    I need gallery in my site http://www.stivcinik.com/ but I don’t know how to solve conflict with NextGen gallery, do You have solution
    Thanks Thanks Thanks Thanks Thanks
    Dario

Leave a Reply

CommentLuv badge