WordPress.org

Ready to get started?Download WordPress

Forums

GC Testimonials
[resolved] rotate testimonials on page (13 posts)

  1. bluetaildesigns
    Member
    Posted 1 year ago #

    Working on a new site (not published yet). Client would like the testimonials to rotate on a page without refreshing.

    This is the code I have in the page: [random-testimonial category="xx" limit="x"]
    Everything works fine otherwise. Is there a way to have the testimonials rotate without refreshing? Thank you!

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

  2. bluetaildesigns
    Member
    Posted 1 year ago #

    Site is up now: http://www.mansfieldanimaler.com
    The client want the home page testimonials to rotate without a page refresh. What is the code for this, I've searched but haven't found.
    thanks!!
    Janet

  3. devnz
    Member
    Plugin Author

    Posted 1 year ago #

    Your best bet would be to create that area as a sidebar for widgets, and use the testimonial widget set to cycle.

  4. bluetaildesigns
    Member
    Posted 1 year ago #

    Hello!
    Thanks for the response! I'm not sure if I can insert a widget in that area. The Doctor doesn't want the testimonials in a sidebar on the home page. I'll check about the other pages.

    So is it not possible without using the sidebar widget right now?
    Thanks!!
    Janet

  5. devnz
    Member
    Plugin Author

    Posted 1 year ago #

    No its not possible without using the widget right now.

    You could edit the theme and possibly add an area to use the testimonial widget from.

  6. bluetaildesigns
    Member
    Posted 1 year ago #

    Thanks! Ok, thank you, I might try that. One more question, I've set up the widget on the other pages, is there a way to randomize the rotation instead for starting over at the beginning on each page?

    Thank you so much!!
    Janet

  7. devnz
    Member
    Plugin Author

    Posted 1 year ago #

    Not without editing the plugin file for now, I will look into this for the next release.

    If you want to try editing the plugin, look for this code at around line 708:

    $args = array(
    	$term_taxonomy 		=> $term_slug,
    	'posts_per_page' 	=> $no,
    	'orderby'         	=> 'post_date',
    	'order'			=> 'DESC',
    	'post_type' 		=> 'testimonial',
    	'post_status'     	=> 'publish'
    );

    and change to:

    $args = array(
    	$term_taxonomy 		=> $term_slug,
    	'posts_per_page' 	=> $no,
    	'orderby'         	=> 'rand',
    	'post_type' 		=> 'testimonial',
    	'post_status'     	=> 'publish'
    );

    Note that I have not tested this code, so please backup any files you are changing.

  8. bluetaildesigns
    Member
    Posted 1 year ago #

    Great! Thank you, I'll try it out! Do you think you might also add some code to auto-rotate the testimonials that are used on pages with short code?

    Thank you again so much!! You Rock!
    janet

  9. devnz
    Member
    Plugin Author

    Posted 1 year ago #

    This is a bit more complex to do. It may possibly be added at a later date but I cant guarantee it sorry.

    If you really want to add auto-rotate to a page, you may need to look into editing the theme or page template and adding a widget area to pull the testimonial widget using the cycle option.

  10. bluetaildesigns
    Member
    Posted 1 year ago #

    Ok, thank you!! I appreciate you getting back with me so quickly!
    I'll let you know once I try out the code you gave me if I can get access to it.

    Thank you again!
    Janet

  11. devnz
    Member
    Plugin Author

    Posted 1 year ago #

    Glad to help :) Keep me posted with how you get on!

  12. bluetaildesigns
    Member
    Posted 1 year ago #

    I will! Thank you!

  13. bluetaildesigns
    Member
    Posted 1 year ago #

    Hi Devnz!

    I tried the code you gave me and it stayed the same (didn't randomize the testimonials in the widget)

    Thank you! I'll just wait until your next release.
    Thanks again!
    Janet

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic