Tagged: mediapress randomisation
Hello,
I understand the orderby parameter functions in the media list shortcode and have used it successfully, but it doesn’t seem to randomise entries.
Could I get an example of how this is used / written?
Thanks
Hi Richard,
Please try usingorderby = 'random'
That should do it.
Regards
BrajeshUnfortunately it doesn’t seem to work. I tried different variations: orderby=random, orderby=’random’, orderby=”random” and none of them worked.
orderby=modified (as an example) does but not the random option.
I had a quick google and a different variation that someone suggested does work: orderby=rand.
So orderby=random is incorrect, at least on my installation.
Hi Richard,
yes, ‘rand’ is the correct value.
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parametersI was mistaken by our internal docs. Need to update that.
Regards
Brajesh
You must be logged in to reply to this topic.