Support » Plugin: Testimonials Widget » [Plugin: Testimonials Widget] Next Testimonial (not pagination)

  • Resolved brian7997

    (@brian7997)


    For those who want a “next testimonial” link, to skip to the next testimonial in the rotation, this is what I did.

    Add this to your header or footer:

    <script type="text/javascript">
    
    	jQuery(document).ready(function(){
    			jQuery('.next-testimonial').click( function() {
    				nextTestimonial100000();
    			})
    	});
    </script>

    The function name “nextTestimonial100000()” will change based on the instance of the widget you want to target.

    Now where ever you want the next button be (for me, below the testimonials) you will need to add an HTML element with the class “next-testimonial”

    e.g.
    <span class="next-testimonial">next</span>

    Also this doesn’t turn off the rotation only initiates it early, so if you want to disable the auto-rotate, I suggest setting the interval to a high number (e.g. refresh_interval=99999999)

    I added a next link because by testimonials are longer and various lengths, so the timing is tricky. Also I wanted an indicator that there are more testimonials.

    http://wordpress.org/extend/plugins/testimonials-widget/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Contributor Michael Cannon

    (@comprock)

    brian7997, that’s cool. I hadn’t thought of that. I’ll see about making this a feature.

    The function name “nextTestimonial100000()” will change based on the instance of the widget you want to target.

    How to check id of instance of the targeted widget? I’ve try your code but not success

    Plugin Contributor Michael Cannon

    (@comprock)

    Look in the source code of your page for the testimonials widget and then you’ll see the code like nextTestimonial100000.

    Look in the source code of your page for the testimonials widget and then you’ll see the code like nextTestimonial100000.

    I look in the source code of testimonials widget and see:

    static $widget_number = 100000;

    and:

    <script type="text/javascript">
    
    	function nextTestimonial$widget_number() {
    		if (!jQuery('.$id_base').first().hasClass('hovered')) {
    			var active = jQuery('.$id_base .testimonialswidget_active');
    			var next = (jQuery('.$id_base .testimonialswidget_active').next().length > 0) ? jQuery('.$id_base .testimonialswidget_active').next() : jQuery('.$id_base .testimonialswidget_testimonial:first');
    			active.fadeOut(1250, function(){
    				active.removeClass('testimonialswidget_active');
    				next.fadeIn(500);
    				next.addClass('testimonialswidget_active');
    			});
    		}
    	}
    
    	jQuery(document).ready(function(){
    		jQuery('.$id_base').hover(function() { jQuery(this).addClass('hovered') }, function() { jQuery(this).removeClass('hovered') });
    		setInterval('nextTestimonial$widget_number()', $refresh_interval * 1000);
    	});
    </script>

    but script of brian7997 to added to header(or footer) it don’t work, click “next” don’t change anything. Sound like the problem is nextTestimonial100000 function but i don’t know how to fix. So i’ll wait your next release version with this usefull feature

    Plugin Contributor Michael Cannon

    (@comprock)

    Look in the source code of your web page, not the PHP source code.

    Plugin Contributor Michael Cannon

    (@comprock)

    Any suggestions on styling the “Next testimonial” link?

    I’m close to coding this, but want the user experience sorted out beforehand.

    My “Next testimonial” link still can’t click, glad to see you code this function, that easy for newbies. My styling: http://ns8.upanh.com/b3.s33.d3/9a12dfe0be6ede4e133392e528441e67_51152088.capture4.jpg

    Plugin Contributor Michael Cannon

    (@comprock)

    The link doesn’t work.

    Thread Starter brian7997

    (@brian7997)

    I would suggest using a text link with a class attached for easy styling. Maybe in the options panel you could select:

    • Define link text
    • Placement: above or below testimonial
    • Upload a image for a button to replace the text.

    Reupload:
    9a12dfe0be6ede4e133392e528441e67_51152088.capture4

    Plugin Contributor Michael Cannon

    (@comprock)

    Ah, great, thank you guys for the help. I’ve got a vision now. This makes coding much easier.

    Plugin Contributor Michael Cannon

    (@comprock)

    Release 1.5.0 of Testimonials Widget Premium has next testimonials links.

    Creatrix

    (@chrisl_57)

    This works great so thanks!

    If I wanted to get the previous slide is it just a case of changing the jquery around?

    Plugin Contributor Michael Cannon

    (@comprock)

    Yup, but also adding some further HTML to have separate previous/next links.

    azaj_00199

    (@azaj_00199yahooin)

    can anyone help me to put bullet navigation button above testimonial widget plugin in slider urjuntly

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: Testimonials Widget] Next Testimonial (not pagination)’ is closed to new replies.