
-
AuthorPosts
-
September 2, 2021 at 2:39 pm #1319524
Hello,
Is it possible to have the testimonial grid ‘flip’ or change the testimonials every 8 seconds ish? In other words can we format the testimonial grid to rotate the testimonials? I am aware of the ‘slider’ option, however our client would much prefer the grid option.
I look forward to hearing from you!
Kind regards,
September 4, 2021 at 10:15 pm #1319746Hey natashawalker1,
Thank you for your patience and for the link to your site, the main trouble with your request is that when the testimonials are shown as a grid they are all showing, so what would you show when they change? When the testimonials are in slider mode only one testimonial is shown at a time.
I did come up with a solution where if you have two testimonial elements showing 3 testimonials in a grid each, then we could toggle between the two elements every 8 seconds. But I couldn’t do this on your site because you are using Enfold v4.5.7 and in that version, the testimonial element doesn’t have the custom class option, so you will need to update your theme, but I will explain how to do this.
First, on your page create two testimonial elements each with 3 different testimonials
The add the custom classes first & last to them:
Then add this code in the General Styling ▸ Quick CSS field or in the WordPress ▸ Customize ▸ Additional CSS field:.avia-grid-testimonials.last { display: none; }
Then add this script to the end of your functions.php file in Appearance ▸ Editor:
function custom_script() { ?> <script> (function($) { setInterval(function(){ $('.avia-grid-testimonials').toggle() },8000); }(jQuery)); </script> <?php } add_action('wp_footer', 'custom_script');
Now you can have two grids switching back and forth, and each grid can be as many elements as you wish but try to have the two use the same number of items. But please note that the switch is sharp without any animation, I tried to add some animation but the timing proved to be very tricky so the plain toggle worked best.
Hopefully, this will help you.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.