Title: Random
Last modified: April 21, 2024

---

# Random

 *  Resolved [Dan Caragea](https://wordpress.org/support/users/dancaragea/)
 * (@dancaragea)
 * [2 years ago](https://wordpress.org/support/topic/random-24/)
 * I chose Random option for Order by. If I play a video, under „You may also like”
   I see a list of videos, the number I chose, in columns. I click on another video
   in the list, it plays, but „You may also like” list is the same (no random videos),
   and so on. 4 years ago I asked here support also for Random which has since worked
   OK.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [wpvideogallery](https://wordpress.org/support/users/wpvideogallery/)
 * (@wpvideogallery)
 * [2 years ago](https://wordpress.org/support/topic/random-24/#post-17702190)
    1. Kindly go to the “Video Gallery => Settings => General (tab) => Single Video
       Page (submenu)” from your WordPress Admin Dashboard.
    2. Scroll down to the “Related Videos” section.
    3. Select “Random” from the “Order By” option.
    4. Save the changes and check now.
 * Hope this solved your issue!
 * Please let me know if still the issue remains.
 *  Thread Starter [Dan Caragea](https://wordpress.org/support/users/dancaragea/)
 * (@dancaragea)
 * [2 years ago](https://wordpress.org/support/topic/random-24/#post-17702364)
 * The issue remains. I have this settings there: Columns – 4; Limit (per page) –
   16; Order by – Random; Order – Descending; Show / Hide – Pagination (checked).
   On first page I see the latest videos added, in descending order, even if I play
   another video. Same for following pages.
 *  Plugin Contributor [wpvideogallery](https://wordpress.org/support/users/wpvideogallery/)
 * (@wpvideogallery)
 * [2 years ago](https://wordpress.org/support/topic/random-24/#post-17702502)
 * Aah. Sorry, this is a Bug from our last version 🙁
 * Generally, we will be very careful when making new releases. But, sorry that 
   we are humans too and this happened out of our control. I promise that we will
   be more careful when making new releases in the future.
 * **Solution:**
 * Edit open the following file,
 *     ```wp-block-code
       /wp-content/plugins/all-in-one-video-gallery/public/videos.php
       ```
   
 * Find the lines below (#316 – #317),
 *     ```wp-block-code
       'orderby'         => (int) $related_videos_settings['orderby'],
       'order'           => (int) $related_videos_settings['order'],
       ```
   
 * Replace them as follows,
 *     ```wp-block-code
       'orderby'         => sanitize_text_field( $related_videos_settings['orderby'] ),
       'order'           => sanitize_text_field( $related_videos_settings['order'] ),
       ```
   
 * Save the changes and check now.
 * Hope this solved your issue!
    -  This reply was modified 2 years ago by [wpvideogallery](https://wordpress.org/support/users/wpvideogallery/).
    -  This reply was modified 2 years ago by [wpvideogallery](https://wordpress.org/support/users/wpvideogallery/).
 *  Thread Starter [Dan Caragea](https://wordpress.org/support/users/dancaragea/)
 * (@dancaragea)
 * [2 years ago](https://wordpress.org/support/topic/random-24/#post-17702541)
 * I made the changes to code. Now it is OK – Random. P.S. We are humans, we must
   collaborate.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Random’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-video-gallery/assets/icon-256x256.png?rev=3078876)
 * [All-in-One Video Gallery](https://wordpress.org/plugins/all-in-one-video-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-video-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-video-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-video-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-video-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-video-gallery/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Dan Caragea](https://wordpress.org/support/users/dancaragea/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/random-24/#post-17702541)
 * Status: resolved