1

Looking to get a random entry from my database which is tagged with 'featured', is this possible at all? I've seen randomised by just the entry loop but nothing else.

3

You could try customizing the order parameter. MySQL allows ordering randomly by using .. ORDER BY rand(). So you could try the following:

craft.entries.section('featured').order('rand()').first()
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.