WordPress.org

Ready to get started?Download WordPress

Forums

Rotating Tweets (Twitter widget and shortcode)
[resolved] [Plugin: Rotating Tweets widget and shortcode] Tweets are not rotating (92 posts)

  1. VFLnews
    Member
    Posted 1 year ago #

    Thank you!
    The answer was the plugin "dSero AdBooster", when deactivated your plugin started working.

  2. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    CollosalKid,

    First option might be to upgrade the easing script to the last version - http://gsgd.co.uk/sandbox/jquery/easing/ (although keep the old one in case it breaks everything).

    If that doesn't work, you could try replacing:

    jQuery(function() {
         jQuery(".mygallery").jCarouselLite({
              btnNext: ".nextb",
              btnPrev: ".prevb",
              visible: 1,
              speed: 2500,
              auto: 2500,
              easing: "backout"
         });
    });

    with:

    jQuery(function() {
         jQuery(".mygallery").cycle({
              next: ".nextb",
              prev: ".prevb",
              visible: 1,
              timeout: 2500,
              fx: 'scrollLeft',
         });
    });

    It may be possible to get the exact bounce effect you currently have, but I'm not sure how!

  3. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    metapaul

    Two possible problems.

    1. You're not using the default version of jQuery. Currently it loads from http://harpoonconsultants.com/wp-content/themes/HarpoonConsultants/libs/js/jquery.min.js?ver=3.5.1 - and there doesn't even seem to be a copy of jQuery at that address! I'd suggest finding the line in header.php that loads jQuery and changing it to wp_enqueue_script('jQuery');

    2. Smooth Slider has its own copy of jQuery Cycle, so you may need to go to smooth-slider/slider_versions/smooth_1.php and change

    wp_enqueue_script( 'jquery.cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),

    to

    wp_enqueue_script( 'jquery-cycle', smooth_slider_plugin_url( 'js/jcycle.js' ),

    If you need to do the second option, I'll see if it's practical to make 'Rotating Tweets' spot the script and adjust accordingly.

  4. colossalkid
    Member
    Posted 1 year ago #

    Hi Martin,

    Thanks for all your help. It is working now. I started updating parts of the theme and then I decided to update the entire theme. It works like a charm now.

    Thanks!
    Kid

  5. metapaul
    Member
    Posted 1 year ago #

    Yes i think changing that should work and thanks a lot for pointing my attention to it.

    Thanks !!!

  6. metapaul
    Member
    Posted 1 year ago #

    i fixed it with the restore jquery plugin in a simple manner ..is that alright and the right thing to do

  7. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    If the tweets are rotating, then that's fine!

    Restore jQuery looks very useful. I may put a reference to it in the instructions.

  8. AlexandreTrudel
    Member
    Posted 1 year ago #

    Hi Martin!

    I am trying to get my tweets rotating with your plugin Rotating Tweets on a wordpress project for the Quebec games 2014.

    It works very well on my wordpress hosted on my portfolio server with the theme Book Lite : http://alexandretrudel.ca/wordpress-3.5/wordpress/

    For the QC games we created a custom theme called jdq-wordpress. If we installed a wp's basic theme like twentyeleven it works well.
    What do I need to add to our theme to get our tweets rotating?

    URL : http://raphaelandre.com/test_wordpress/

  9. AlexandreTrudel
    Member
    Posted 1 year ago #

    Thank you in advance for your help!

    - Alexandre Trudel
    alexandretrudel.ca

  10. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    Alexandre,

    That's a new one. There's no Rotating Tweets javascript at all! :-)

    Do you have wp_head(); just before </head> in your header.php file of your template!

    Martin

  11. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    By the way, Alexandre, would you be up for doing some translating?

    The latest French language file is here.

    It doesn't all need doing. Just the public-facing stuff ('yesterday') etc.

  12. AlexandreTrudel
    Member
    Posted 1 year ago #

    No, I don't have wp_head(); in my <head> in the header.php file.

    Yes, I can do some french translating.

    My functions.php has this code :

    <?php
    	add_theme_support( 'menus' );
    	add_theme_support( 'custom-header' );
    
    	function jdq_widgets_init() {
    	register_sidebar( array(
    		'name' => __( 'twitterfeed', 'Jeux du Qu├ębec 2014' ),
    		'id' => 'twitterfeed',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget' => "</aside>",
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    }
    add_action( 'widgets_init', 'jdq_widgets_init' );
    ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

  13. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    As far as I can tell, the code looks good.

    The wp_head() is used by a bunch of plug-ins to load Javascript and CSS, so if you put that in, then everything should work!

  14. AlexandreTrudel
    Member
    Posted 1 year ago #

    Ok thank you! I'll try this :)

  15. AlexandreTrudel
    Member
    Posted 1 year ago #

    It works!!

    I just added this line in my header.php in the head and the tweets are rotating.

    Thanks a lot Martin!

  16. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    Great! Pleased it worked! :-)

    Martin

  17. AlexandreTrudel
    Member
    Posted 1 year ago #

    Hi Martin!

    There is the french translated file for Rotating Tweets.

    Rotating Tweets FR

    - Alexandre Trudel

  18. grifmang
    Member
    Posted 1 year ago #

    Hello Martin! I was wondering if you wouldn't mind taking a look at why my plugin doesn't show up on my site?

    hxxp://meganmichellemusic[dot]com/

    Thanks in advance for any and all help!

  19. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    Interesting question... the Javascript is there, but the tweets definitely aren't.

    Have you put it in a post via shortcode or in a widget?

    And, if the former, is there some code on your page to display the post?

  20. grifmang
    Member
    Posted 1 year ago #

    I used a widget. I thought maybe there was some sort of javascript conflict. Not sure what's goin on lol

  21. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    Have you tried any other widgets?

    There are currently no tweets being displayed in the HTML.

    What settings do you have for the widget? Perhaps try it on something bombproof (like the 5 ordinary tweets on the 'twitter' account) to see what happens.

  22. grifmang
    Member
    Posted 1 year ago #

    I do have 2 other widgets, Text widgets, that don't show either. Assuming it is all ties together, but for the life of me can't see why.

    hmmm ...

  23. grifmang
    Member
    Posted 1 year ago #

    And yeah, I am using just 5 tweets, scrolling up, user timeline, exclude replies, speed is 3 seconds, then in the Display Format I have Original rotating ticked, then just the username of tweeter, then none for show follow button.

  24. grifmang
    Member
    Posted 1 year ago #

    I actually got it going. Thanks for the help!

  25. localoneway
    Member
    Posted 1 year ago #

    Hello Martin,

    I was wondering if you could help me get my tweets to rotate. They are showing up in the code, but they are not rotating. The link is leenewton.com

    Thanks,
    Andrew

  26. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    Andrew,

    Looking at the HTML, the problem is that your page loads jQuery twice - and the second 'loading' comes after jquery-cycle has been loaded - so that jquery-cycle gets overwritten and doesn't work when rotatingtweets calls it.

    Double-loading of jQuery normally is a theme problem (although it can happen with some plug-ins) - so you may want to look at your header.php file or functions.php to find it. The two 'dodgy' lines are:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="/scripts/custom.js"></script>

    which would ideally need to be replaced with a version using the wp_enqueue_script command along the lines of:

    wp_enqueue_script( 'custom-script' , '/scripts/custom.js', array('jquery') );

    Or even, if you move `/scripts/custom.js' to the template directory:

    wp_enqueue_script(
    	'custom-script',
    	get_template_directory_uri() . '/scripts/custom.js',
    	array( 'jquery' )
    );
  27. Interfluence
    Member
    Posted 1 year ago #

    Hi Martin -

    Nice to see you have been supporting your work so directly!

    Unfortunately, I'm having the same problem; no rotation of tweets.

    I've tried a few of the suggestions I found here; replacing the theme's jquery call with "wp_enqueue_script" made the rotation work, but broke the theme's layout.

    Any suggestions? For now I've just titled the widget "Latest on Twitter". The site is at:

    http://jackedandjilted.com

  28. Interfluence
    Member
    Posted 1 year ago #

    Sorry, I should have also mentioned that the sidebar is different on posts vs. the main page. It's the js file that makes the New Posts/New Comments tabs function that seems to be the problem...

  29. Martin Tod
    Member
    Plugin Author

    Posted 1 year ago #

    It's likely to be more important to put wp_enqueue_script commands in for the other theme scripts - with an appropriate reference back to jQuery.

    Something like:

    wp_enqueue_script('jquery');
    wp_enqueue_script('jcarousel', get_template_directory_uri().'/js/jquery.jcarousel.pack.js',array('jquery'));
    wp_enqueue_script('supersubs', get_template_directory_uri().'/js/supersubs.js',array('jquery'));
    wp_enqueue_script('superfish', get_template_directory_uri().'/js/superfish.js',array('jquery'));

    and then take the long javascript on the page and put it in an external file...

    wp_enqueue_script('newspress-pagelayout', get_template_directory_uri().'/js/pagelayout.js',array('jquery','superfish','supersubs'));

    Martin

  30. Interfluence
    Member
    Posted 1 year ago #

    Thanks for the quick response.

    I've given this a shot, same result. The "New Posts/New Comments" tabs still explode, putting the comments lower on the page, and revealing a tag cloud.

    Since you seem to be responding so quickly, I leave the results live for you to see. It doesn't render the site unusable, just a little sloppy ;-)

    Here's what I used in the header (between the "custom.css" code and closing head tag), putting the javascript in an external file as you suggested, in the specified directory, using the file name used in the code you provided:

    <?php wp_enqueue_script('jquery'); ?>
    <?php wp_enqueue_script('jcarousel', get_template_directory_uri().'/js/jquery.jcarousel.pack.js',array('jquery')); ?>
    <?php wp_enqueue_script('supersubs', get_template_directory_uri().'/js/supersubs.js',array('jquery')); ?>
    <?php wp_enqueue_script('superfish', get_template_directory_uri().'/js/superfish.js',array('jquery')); ?>
    <?php wp_enqueue_script('newspress-pagelayout', get_template_directory_uri().'/js/pagelayout.js',array('jquery','superfish','supersubs')); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic