Sort events by published date on custom query.

Home Forums Calendar Products Events Calendar PRO Sort events by published date on custom query.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #762607
    fenoco
    Participant

    Hi, I have a custom query to show three different types of posts on my home. One post type is tribe_events. Everything works fine, except that tribe_events post’s are listed by the event’s date and not the event’s published date. ¿Is there a way to fix this? Thanks!

    #763889
    Josh
    Participant

    Hello fenoco,

    Thanks for reaching out to us!

    We do have a tutorial that shows how to switch the ordering of the events to sort by post date for the main loop which may help with modifying your custom loop.

    There is also some great information in this thread that may also help. It uses pre_get_posts() to set the orderby parameter.

    I’m sorry I wasn’t able to give you a direct response however I hope this was able to point you in the right direction.

    Thanks!

    #764542
    fenoco
    Participant

    Thank you very much Josh, that did the job 🙂

    #765026
    Josh
    Participant

    Hello fenoco,

    Glad I was able to help!

    If you have a few moments, we would definitely appreciate it if you took a second to rate our plugin on the WordPress.org repository.

    I’ll go ahead and close this ticket. If you have any further questions please don’t hesitate to open a new one.

    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Sort events by published date on custom query.’ is closed to new replies.