Order related events

Home Forums Calendar Products Events Calendar PRO Order related events

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1277529
    nmafa
    Participant

    Hello,

    On event pages I see the three ‘related events’ as they should be but for some reason they order themselves randomly and what we need is for all related events on event pages to order chronologically.

    Example (now):
    Event May 22 — Event March 11 — Event January 22

    What we need is:
    Event January 22 — Event March 11 — Event May 22

    Thank you

    #1277982
    nmafa
    Participant

    Here is a screenshot of my problem. I appreciate any help.

    #1278332
    Victor
    Member

    Hi Michael!

    Thanks for reaching out to us!

    The related events show randomly by default, so that is the expected behaviour.

    If you want to change the order in which they appear then you should check the code that Cliff put up in the following thread > https://theeventscalendar.com/support/forums/topic/order-related-events/

    I hope it helps 🙂

    Best,
    Victor

    #1281669
    nmafa
    Participant

    Cliff,

    thank you for your response. Unfortunately, the code above is not on the page it says it should be (general.php). I am in no way a php programmer so had the example code you linked to been relevant I’m not sure if I would have been able to figure it out anyways.

    Is there another approach we can try? This is a feature request and is one I agree with. Why would your company default to random when people generally look at things chronologically? Either way, I’m hoping that I can get an answer that doesn’t assume my skill level. We are a customer of a few of your products so I hope that we can solve this together.

    Thanks in advance
    Mike

    #1281794
    Victor
    Member

    Hi Mike!

    I’m sorry I didn’t give you more details on how to achieve that. That was something to point you in the direction of customizing the order of related events.

    Just to set expectations right, we are fairly limited in how much support we can give for customizations like that.

    That said, we are always happy to help and at least point you in the right directions. So let me try and help you with this.

    I’ve put up a simple code to order the related events by their start date. You should copy and paste the following snippet of code into your theme’s functions.php file:

    https://gist.github.com/vicskf/6c549b4604614b078f1080c14bd79f39

    Remember not to copy the ‘<?php’ opening tag.

    Does it do the trick? Let me know about it 🙂

    Cheers!
    Victor

    #1281855
    nmafa
    Participant

    Victor,

    YES! It did the trick. Thank you, I am most appreciative.

    Mike

    #1281869
    Victor
    Member

    Hey Mike!

    I’m glad that worked out for you! Thanks for letting me know about it.

    I’ll close this thread as you marked it as resolved, but feel free to open a new one when needed.

    Good luck with your project!
    Victor

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Order related events’ is closed to new replies.