I am having a hard time figuring out if there is a way to show random favorite images in the Photo Gallery module. I set up a custom field one with the name “favorite”, and on my favorite photos, I type in “yes”.
I want my box to show probably 6 photo thumbnails. The problem I am having is when I orderby="random", it seems to randomizes all the photos, instead of just ones marked favorite. So in my box, it will show 1, or 2, or no photos (e.g. it seemed to randomly pick 6 photos, but only one of the random photos were marked as a favorite, so it only showed one).
here is my latest code—and I’ve tried a bunch of different ways.
{exp:gallery:entries gallery="{gallery_name}" orderby="random" columns="8" rows="8" limit="4"}
{entries}
{row}
{if custom_field_one == “yes"}<a href="{id_path=gallery/image_full}">{thumb_url}</a>{/if}
{/row}
{/entries}
{/exp:gallery:entries}
It seems to me that my IF statement is in the wrong place, but I can’t figure out where to put it.
