Display events random like

Home Forums Welcome! Pre-Sales Questions Display events random like

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #19253
    Lloyd
    Guest

    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.

    #19277
    Rob
    Member

    Hey 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.

    #19309
    Lloyd
    Guest

    I 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.

    #19332
    Rob
    Member

    Hey Lloyd. Sure thing; not positive about this myself, but let me see if our dev Jonah has any ideas here. Stay tuned.

    #19363
    Jonah
    Participant

    Hey 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,
    Jonah

    #19374
    Lloyd
    Guest

    Getting some very odd loop de loop, its outputting 6 x 6 events!

    #19494
    Rob
    Member

    Hey Lloyd: have you modified the start/end dates accordingly?

    #976895
    Support Droid
    Keymaster

    This 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.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Display events random like’ is closed to new replies.