Home › Forums › Welcome! › Pre-Sales Questions › Display events random like
- This topic has 7 replies, 3 voices, and was last updated 8 years, 8 months ago by Support Droid.
-
AuthorPosts
-
May 16, 2012 at 3:27 am #19253LloydGuest
Hi. I have a client using Events Calendar Pro.
We display a list of 6 current events on the home page.
Due to their being some very long running events, the same 6 always get displayed, is there anyway i can get it to select 6 random events (that started before today and end after today)?I have had a poke around the code and i can see where the WHERE statements are being prepared, would it just be a case of amending these?
Thanks,
Lloyd.
May 16, 2012 at 5:29 pm #19277RobMemberHey Lloyd. Thanks for reaching out. Have you checked out our template tag documentation at tri.be/support/documentation, to see if it pointed you in the right direction? While I’m not sure you’d be able to get them totally random you could certainly control the events that appear with some finesse, and not just rely on what the system kicks out…
Let me know if that helps, and I can adjust my response if it isn’t.
May 17, 2012 at 7:41 am #19309LloydGuestI have had a look and can’t really see anything that will directly help me without attempting to rewrite the plugin (not a php dev).
Is there anywhere that I can just strip out where is attempts to order the dataset or append something to jiggle it up a bit?
Or even a more direct indication of how I might go about this would be great.Thanks,
Lloyd.
May 17, 2012 at 2:05 pm #19332RobMemberHey Lloyd. Sure thing; not positive about this myself, but let me see if our dev Jonah has any ideas here. Stay tuned.
May 17, 2012 at 8:12 pm #19363JonahParticipantHey Lloyd,
You should be able to use something like this: https://gist.github.com/2722925
Modify the start/end dates as needed and all the markup/content in the loop and you should be good to go.
Let me know if you need anything else.
Cheers,
JonahMay 18, 2012 at 7:21 am #19374LloydGuestGetting some very odd loop de loop, its outputting 6 x 6 events!
May 21, 2012 at 7:27 pm #19494RobMemberHey Lloyd: have you modified the start/end dates accordingly?
July 7, 2015 at 6:20 am #976895Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Display events random like’ is closed to new replies.