Just installed Rotating Tweets; it picked up a tweet from 5 hours ago but it hasn’t rotated off that tweet. I’ve checked the setting, I’ve tweeted other things since then, but it’s still stuck. I deactivated and reactivated; I deactivated my former Twitter widget (Twitter Tools). Any other ideas?
Something (the template? a badly written plug-in?) is reinstalling an old version of jQuery as per:
This has the effect of breaking all the other jQuery code on the site (including rotatingtweets)!
Unfortunately, it’s hard to identify exactly what’s happening because the excellent W3 Total Cache plug-in is minimising everything – which makes it hard to debug.
But looking at the original sleek theme, it appears to load jQuery at least twice (and not using the standard WordPress install – which in your case is v. 1.7.2!). There may be another plug-in loading it on top – but I can’t really tell.
If you can let me know which other plug-in you are using that is doing its own installation of jQuery – or let me know how your template is installing jQuery (hopefully using the
wp_enqueue_scriptcommand) then I may be able to add a hack to rotatingtweets that solves the problem.
If your template hard codes the reference to jQuery (for example in the header file) then you can try commenting it out and your site is likely to work better as a result!
To look at it another way, somewhere your site template has either something hardcoded like:
in which case comment it out, or something like:
wp_enqueue_script('somenamethatisntjquery', get_bloginfo('template_directory') . '/library/scripts/jquery.min.js', array()); wp_enqueue_script('someothernamethatisntjquery', get_bloginfo('template_directory') . '/library/scripts/jquery.js', array());
which can both be commented out and replaced by
You would also need to change any references to
wp_enqueue_scriptcommands elsewhere in the template to
wp-content/themes/kreativethemes_sleek/library/scripts/functions.jshasn’t been updated to reflect the change to jQuery made by WordPress. You may need either to change every reference to:
to make it work.
While this approach would make your site more robust for the long term – alternatively, if you can tell me what the
someothernamethatisntjquerynames are, I can modify rotatingtweets to detect it and solve the problem without you needing to do any major work!
thanks for your reply. I disabled w3 caching for now to make it easier to debug. As you noticed it is indeed using 1.3.2.
I just noticed that this is hardcoded into the sleek template when enabling the CDN option in the optimization panel.
Actually even with disabling all js includes of sleek:
It won’t rotate for some reason.
Your page still has four separate jQuery installations! Two in the template – one standard WordPress installation (triggered by Rotating Tweets) and then another (which breaks all the preceding ones) installed by NextGen !
There are still all kinds of problem with the template, and I would suggest changing
If you want to use the Google version of jQuery, the best way is to install the Use Google Plugins plug-in in addition.
How are the other scripts added in? Do they use
wp_enqueue_scriptor are they hard coded too?
If they’re hard-coded, you may want to replace them with:
wp_enqueue_script('hoverintent', get_bloginfo('template_directory') . '/library/scripts/hoverIntent.js', array('jquery')); wp_enqueue_script('superfish', get_bloginfo('template_directory') . '/library/scripts/superfish.js', array('jquery')); wp_enqueue_script('fieldtag', get_bloginfo('template_directory') . '/library/scripts/jquery.fieldtag.min.js', array('jquery')); wp_enqueue_script('sleekfunctions', get_bloginfo('template_directory') . '/library/scripts/functions.js', array('jquery','superfish','fieldtag'));
It’s vital that all these lines of code come before the one that reads:
if they’re in the
This may still not solve the problem because of the way NextGen is loading the script after everything else. If you switch off NextGen, the tweets may start to rotate even now. I’m going to dig a bit further into that and find a solution that makes the plugin work alongside NextGen.
PS: I’ve just installed Rotating Tweets alongside NextGen Gallery on my test site and it seems to work OK.
Are there any other NextGen related plug-ins that you’ve installed?
I see, so I guess my site has a big jquery mess because of the way some plugins include it I suppose (and the way how Sleek has hardcoded jquery into its template). I currently have the following plugins installed (all updated to the current versions):
- All in One SEO Pack
- Easy JS and CSS support.
- Executable PHP widget
- Google Analytics for WordPress
- Google XML Sitemaps
- Hello Dolly
- NextGEN Gallery
- Rotating Tweets (Twitter widget & shortcode)
- WordPress Download Monitor
I have disabled w3 caching for now.
Btw is the one on your demo website using a newer build, since it seems to include an avatar as well (looks great!)?
WordPress is designed to cope with lots of plug-ins, provided everyone plays fair! 🙂
As far as I can tell, the only two plug-ins that use jQuery are NextGen Gallery and Rotating Tweets – and they play fair with each other and try to use the standard WordPress jQuery installation!
In this case, the problem is not the plug-ins, but I think it is more likely to be the template – as outlined in my previous notes.
Spoke too soon! I’ve found the problem.
In pb-embedFlash the plug-in hardcodes in jQuery in about line 9 of
The simplest solution is to comment out the line that reads
You can either remove it completely, or put
#at the beginning of the line.
Ah, you’re right, seems like that plugin was messing it up! I commented out that line as you suggested (but leaving the sleek template untouched) and it finally started to scroll!
Thanks for your help Martin, I have made a small donation for your support as well.
Hi Martin! On my new blog (http://claimed.me) i can’t rotate my tweets… can you help me ?
If you remove (or comment out) this line from your theme, then the plug-in should work:
I’m not quite sure how the theme file has put that line in. Could you let me know where you got the theme from, and I can give a more specific answer.
I’ve get min themes on themeforest (http://themeforest.net/item/min-a-minimal-wordpress-theme/57155)
i’m sorry but where a can find the line to remove ?
- The topic ‘[Plugin: Rotating Tweets widget and shortcode] Tweets are not rotating’ is closed to new replies.