WordPress.org

Ready to get started?Download WordPress

Forums

Testimonials by Aihrus
[resolved] Multiple instances/Prevent same testimonial to appear again (21 posts)

  1. peek
    Member
    Posted 1 year ago #

    Hi there,

    I really love the plug in so far.
    Worked "out of the box", many great features!

    However, if I use multiple instances on a page/site I did not find a way to prevent one quote to appear more than once.
    I know I could use categories and then run multiple instances of the plugin but with different categories. Thing is, I want just one pool of quotes and to display various quotes across the site.

    Does each testimonial have an ID i can access and store in an array which would then be used to exclude testimonials??

    Thanks for any help,
    peek

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

  2. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Thank you for the compliment.

    I've added this "prevent duplicates on a page" to the todos.

  3. peek
    Member
    Posted 1 year ago #

    Hi Michael,

    Thanks for your answer.
    Unfortunately I need this very soon.

    If you could just give me a hint how to get an testimonials ID and how to exclude testimonials, I might be able to code this myself.

    Thanks,
    P

  4. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    I'm coding this into the premium version now. However there's a few quirks that I want to resolve before releasing later this week.

    The exclude version of TW will come out about the same time.

  5. peek
    Member
    Posted 1 year ago #

    Understood.

    A short note here when it's out would be great.

    Best,
    P

  6. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Testimonials Widget Premium now offers unique testimonial showing.

    Read FAQ 17 for more details.

  7. peek
    Member
    Posted 1 year ago #

    Awesome, purchased!
    Thanks for the fast implementation!

    Best,
    P

  8. peek
    Member
    Posted 1 year ago #

    I'm trying to use the premium version as follows:

    <?php
    	$args = array(
    					'refresh_interval'=> 0,
    					'unique'=>'true'
    				);
    	echo testimonialswidget_widget($args);
    ?>

    but only get "No testimonials found".
    Yes, I created testimonials.
    What am i doing wrong?

    Best,
    p

  9. peek
    Member
    Posted 1 year ago #

    if i don't set "unique" at all, testimonials are shown.

  10. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    How many other testimonials widgets do you have running?

    Do you have enough testimonials to support each showing 10 each?

    If not, I would recommend trying limit=5.

  11. peek
    Member
    Posted 1 year ago #

    I have rotations turned off.
    So each widget should just show 1 testimonial.
    And there's like 2-3 widgets in EACH sidebar.
    Because the page does have multiple sidebars, each next to a post.

    Check it out:
    http://aq295.w4yserver.at/wp/

    The qotes sidebar is not implemented here yet.

    but this is how my custom sidebar.php for the quotes looks like for now:

    <!-- $extra_class gets set in index.php, decides wether sidebar gets positionen left or right -->
    
    <?php
    $args= array(
    	'refresh_interval'=> 0,
    	'unique'=>'true',
    	'limit'=> 1,
    );
    ?>
    
    <div id="presse-<?php echo $c ?>" class="sidebar-teaser sidebar-presse fourcol left last clearfix sidebar-<?php echo $extra_class ?>" role="complementary">
    
    	<ul>
    		<hr>
    		<?php echo testimonialswidget_widget($args); ?>
    		<hr>
    		<?php echo testimonialswidget_widget($args); ?>
    	</ul>
    </div>

    i guess i'm doing something fundamentally wrong...

    should i use testimonialswidget_list() instead.
    does it work with unique ?
    it did not when i tested...

    thanks,
    p

  12. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    P,

    Your code looks fine. I haven't tested it though.

    You could remove the 'refresh_interval'=> 0, portion as 'limit'=> 1, invokes "no refresh".

    Specifically, what trouble are you having?

    Michael

  13. peek
    Member
    Posted 1 year ago #

    thanks for your reply!

    testimonial widget indeed works fine for the first sidebar.
    but testimonials repeat as soon as i load a second (or i guess third) sidebar with the widget.

    you can see it here:
    http://aq295.w4yserver.at/wp/?page_id=19

  14. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Can you please send me the template page your doing this custom coding on?

    See bottom of http://wordpress.org/extend/plugins/testimonials-widget/ for how to contact me.

  15. peek
    Member
    Posted 1 year ago #

    will do, thanks!

  16. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Received. Will try to debug over the upcoming week.

  17. peek
    Member
    Posted 1 year ago #

    works great now, thanks!

  18. peek
    Member
    Posted 1 year ago #

    oh sh*t, no it doesn't.
    i guess i had random luck....

    see here: http://aq295.w4yserver.at/wp/presse/

    i'm invoking the testimonials in an sidebar php file which gets included multiple times

    the code:

    <?php
    $args                       = array(
    	'unique'					=>'true',
    	'limit'						=> 1,
    	'no_cache'	=> 'true',
    	'hide_title' => 'true'
    
    );
    ?>
    
    <div id="presse-<?php echo $c ?>" class="sidebar-teaser sidebar-presse fourcol left last clearfix sidebar-<?php echo $extra_class ?>" role="complementary">
    	<ul>
    		<hr>
    		<?php echo testimonialswidget_widget($args); ?>
    		<hr>
    		<?php echo testimonialswidget_widget($args); ?>
    		<hr>
    		<?php echo testimonialswidget_widget($args); ?>
    	</ul>
    </div>
  19. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Remove no_cache.

  20. peek
    Member
    Posted 1 year ago #

    then each sidebar shows the same testimonials...

  21. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    1. Are you using Testimonials Widget Premium? That's required for unique to work.

    2. Have you cleared the cache? See bottom of Premium tab of Testimonials > Settings screen.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic