• Resolved jb2021

    (@jb2021)


    Hi,

    I love this plugin and I want to use it on my website. What I need though is the images to be displayed in random order. There was a topic with this question more than a year ago and you answered that you will be adding this functionality in the next update. Is it possible to set random order for images with shortcode? Or do I need to change php…which is very unconvenient and will be overwritten with every update. Thanks!

    Best,

    JB

    • This topic was modified 3 years, 4 months ago by jb2021.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author totalsoft

    (@totalsoft)

    Hello, dear JB.

    Thank you for contacting us and for reporting your problem.

    To solve your problem, edit our Total-Soft-Portfolio-Widget.php file. On the line 24291 add code:

             <script type="text/javascript">
               jQuery(document).ready(function () {
    					 var parent = jQuery("#ogtot-grid<?php echo $Total_Soft_Portfolio; ?>");
    					    var divs = parent.children();
    					    while (divs.length) {
    					        parent.append(divs.splice(Math.floor(Math.random() * divs.length), 1)[0]);
    					    }
    					})
    
    		 </script>

    Thank You very much.
    Sincerely, Total-Soft

    Thread Starter jb2021

    (@jb2021)

    Thank you for your answer. My Total-Soft-Portfolio-Widget.php file only has 16234 lines total, so what is the proper line to add the script to? Can you please advise? Thank you.

    Best,

    JB

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Random order of images’ is closed to new replies.