Sorting list widget

Home Forums Calendar Products Events Calendar PRO Sorting list widget

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #963676
    cllpanama
    Participant

    My site is working great, but I need to keep the most recently posted events on the home page. I use the event list widget for various areas on the home page. Is there a snippet I can add to the function.php file to first show those that have been most recently been added? Thanks!

    #963758
    Geoff
    Member

    Hi there, clipanama!

    Great question. I do want to note first of all, though, that we are fairly limited in terms of helping out with custom development questions like this one. That said, we’d love to point you in the right direction if we can.

    In this case, I think you would be able to accomplish this by creating a new query in your homepage template that fetches events using the tribe_get_events() function. Here’s a nice tutorial on how that function works with some examples. If you’re wondering how to specifically order events by publish date, I would use:

    [php]
    ‘orderby’ => ‘post_date’,
    [/php]

    …as one of the parameters in the query.

    Will this help you get started? Please let me know. 🙂

    Cheers!
    Geoff

    #964108
    cllpanama
    Participant

    This reply is private.

    #964179
    Geoff
    Member

    My pleasure! I just realized I never linked you to the tutorial I mentioned in my last reply, so here it is. 🙂

    Cheers!
    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Sorting list widget’ is closed to new replies.