Viewing 1 replies (of 1 total)
  • Thread Starter jaydeesigns

    (@jaydeesigns)

    Ok I don’t know if this would be the better way but I solved my problem.
    I needed to fetch a random image within a specific album.
    Here is what I’ve done:

    1. Created a new instance called album_number and added it to the update and widget functions.
    2. Created a new input field with number value, called album_number.
    3. Replaced $selected_album = $data[array_rand($data)]; with $data[$album_number];
    4. That’s it, I am now able to select my specific album, the only thing is I am having trouble identifying my albums, I suppose they are stored in order of creation, So I had to guess mine was album number 3.

      I hope this helps anyone looking to do anything similar.
      Cheers,
      Jay!

Viewing 1 replies (of 1 total)
  • The topic ‘Random image from Specific Album?’ is closed to new replies.